jquery - bootstrap colorpicker change class color -
trying use bootstrap colorpicker ( http://mjolnic.com/bootstrap-colorpicker/ ) change color of text, newbie not able implement it. $('.pickthecolor').colorpicker().on('changecolor.colorpicker', function(event){ $('.headingexample').css("color", "red"); }); is working expected. documentation suggest: $('.my-colorpicker').colorpicker().on('changecolor.colorpicker', function(event){ bodystyle.backgroundcolor = event.color.tohex(); }); how can combine these two? i believe you're looking for: $('.pickthecolor').colorpicker().on('changecolor.colorpicker', function(event){ $('.headingexample').css("color", event.color.tohex()); });