2014-10-05 18:12:21 +02:00
|
|
|
|
|
|
|
# javaScript implementation (IE8+ or with querySelectorAll polyfill)
|
|
|
|
|
|
|
|
Some description follows soon...
|
|
|
|
|
2017-07-23 11:48:58 -04:00
|
|
|
## Demo
|
2014-10-05 18:12:21 +02:00
|
|
|
See **demo** at [dematte.at/cpn/javaScript_implementation](http://dematte.at/cpn/javaScript_implementation)
|
|
|
|
|
2017-07-23 11:48:58 -04:00
|
|
|
## Usage
|
2014-10-05 18:12:21 +02:00
|
|
|
|
|
|
|
```javascript
|
|
|
|
jsColorPicker('input.color');
|
|
|
|
// description of option will follow
|
|
|
|
jsColorPicker('input.color', {
|
|
|
|
klass: window.ColorPicker,
|
|
|
|
input: elm,
|
|
|
|
patch: elm,
|
2014-10-10 23:49:42 +02:00
|
|
|
init: function(elm, colors){}, // initialization callback (before colorPicker gets initialized though)
|
2014-10-05 18:12:21 +02:00
|
|
|
// animationSpeed: 200, will be supported soon
|
|
|
|
// draggable: true,
|
|
|
|
multipleInstances: false
|
|
|
|
margin: {left: -1, top: 2},
|
|
|
|
initStyle: 'display: none',
|
|
|
|
mode: 'hsv-h',
|
|
|
|
size: 1,
|
|
|
|
renderCallback: renderCallback
|
|
|
|
// and all other options from color and colorPicker
|
|
|
|
});
|
2014-10-10 23:49:42 +02:00
|
|
|
```
|