bgrins/spectrum

Setting up multiple color pickers in more efficient way.

vaibhavgeek opened this issue · 2 comments

It would be cool instead rewriting the code again, we could setup color picker for multiple inputs at the same time.
Something on these lines.
$("#cp1, #cp2 ").spectrum({

This is just a suggestion. A better approach could be devised.

You can use something like:

$(".my_color").spectrum();

Fiddle: http://jsfiddle.net/Sy6gU/1/

In my use-case, I just wanted different palette for different color pickers but rest of the options need to be same. This is why I could not use same class selectors.

I used jquery to set it up. Thanks for responding.