资 源 简 介
Apply to an input box to get a colour picker, pure javascript no graphics required.
Requires
| jQuery | http://jquery.com |
|:-------|:------------------|
Pros
No graphics required
Configurable number of colour choices
Kinda cool looking (in the eye of this beholder anyway)
Cons
More than 15 cells can be a bit slow in IE6
Less accurate than a continuous colour map
Usage
You can create a colour picker in one of two ways
1) Select your controls with jQuery and call colorInput(options) on the jquery
var $input = $("input").colorInput({cells:11});
This will create a colorInput on each input with a grid of 11x11 color cells
2) Call the function on the jQuery object colorInput(input[, options])
var colorControl = $.colorInput(document.getElementById("myInput"), {cell