github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

laktek / really-simple-color-picker

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 21
    • 3
  • Source
  • Commits
  • Network (3)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Simple Color Picker written in jQuery. — Read more

  cancel

http://www.web2media.net/laktek/2008/10/27/really-simple-color-picker-in-jquery

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Color picker will change it's color when the input field value is changed 
externally 
laktek (author)
Tue Oct 13 18:33:07 -0700 2009
commit  f1c4c494d9e5b3f37844dadef3ae02d1ec0e2909
tree    1aacbdb9da8075c8a7c5bb78b1a40c5e4fbeefff
parent  ec028830c312738e4aed26ac06cee33fe81e7f42
really-simple-color-picker /
name age
history
message
file README Mon Oct 27 02:35:56 -0700 2008 did some trivial changes [laktek]
file arrow.gif Sun Feb 01 18:11:00 -0800 2009 changed arrow to gif [laktek]
file arrow.png Sun Feb 01 18:11:00 -0800 2009 changed arrow to gif [laktek]
file colorPicker.css Sun Feb 01 18:04:22 -0800 2009 Finally the fix for IE6, thanks Muser for helpi... [laktek]
file demo.html Tue Oct 13 18:33:07 -0700 2009 Color picker will change it's color when the in... [laktek]
file jquery.colorPicker.js Tue Oct 13 18:33:07 -0700 2009 Color picker will change it's color when the in... [laktek]
file screenshot.png Mon Oct 27 01:34:51 -0700 2008 Added color picker files [laktek]
README
Really Simple Color Picker
-------------------------------

Written by Lakshan Perera 
For more info please visit: http://www.web2media.net/laktek/?p=96
Source code is hosted at: http://github.com/laktek/really-simple-color-picker

Color Picker requires jQuery 1.2.6 or higher. So make sure to load it before Color Picker (there's no other 
dependencies!). 
For default styles of the color picker load the CSS file that comes with the plugin.

 <script language="javascript" type="text/javascript" src=jquery.min.js"></script>
 <script language="javascript" type="text/javascript" src="jquery.colorPicker.js"/></script>

 <link rel="stylesheet" href="colorPicker.css" type="text/css" />

Add a text field to take the color input.
  <div><label for="color1">Color 1</label> <input id="color1" type="text" name="color1" value="#333399" /></div>

Then call 'colorPicker' method on the text field when document loads.
<script language="javascript">
  jQuery(document).ready(function($) {
    $('#color1').colorPicker();
  }
</script>

Your favorite colors are missing? 
Just add them to the palette
<script language="javascript">
  //use this method to add new colors to palette
  $.fn.colorPicker.addColors(['000', '000', 'fff', 'fff']);
</script>

Or completely change the color palette as you need...
<script language="javascript">
  $.fn.colorPicker.defaultColors = ['000', '000', 'fff', 'fff'];
</script>

That’s all you have to do!


Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server