Closed ss44 closed 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 ); } });
That makes sense @ss44 ! Merging...
Thanks for that!
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 ); } });