Antonio-Laguna / jQuery-ColorPicker

This is yet another colorpicker plugin for jQuery since most of them are not on GitHub nor being mantained at the moment.
Other
91 stars 22 forks source link

updated change method to return args #8

Closed ss44 closed 11 years ago

ss44 commented 11 years ago

Made a change so that the onChange now provides an additional param of the element, similar to select, making it possible to do a live color select using the actual element instead of relying on a dom request.

ie.   $('.colorSelector').ColorPicker({   onChange : function(hsb, hex, rgb, el) {      $(el).find('div').css('backgroundColor', '#' + hex);      $(el).val(hex);      $(el).data( hex );   } });

Antonio-Laguna commented 11 years ago

That makes sense @ss44 ! Merging...

Thanks for that!