I know there is a plugin named .hasClass ();
I have the following
$('#page_background, #header_background').ColorPicker({...
how would I check if the page_background button is pressed, and not the header_background?
This is what I have now, it wonβt work.
$('#page_background, #header_background').ColorPicker({
onSubmit: function(hsb, hex, rgb, el) {
$(el).val(hex);
$(el).ColorPickerHide();
var id = this.id;
if(id == 'page_background')
$('body').css("background-color","#"+hex);
},
onBeforeShow: function () {
$(this).ColorPickerSetColor(this.value);
}
})
.bind('keyup', function(){
$(this).ColorPickerSetColor(this.value);
});
source
share