Initialize by class selector
MHarmony opened this issue · comments
Is there a way to initialize multiple colorpickers at once by class selector? I tried a few options, such as initializing colorpicker on a single class selector, as well as looping through each element with a class and initializing that element. No luck so far.
please provide an example like it was described in the issue template
<span class="letter" data-letter="A">A</span>
<span class="letter" data-letter="B">B</span>
<span class="letter" data-letter="C">C</span>
<span class="letter" data-letter="D">D</span>
<span class="letter" data-letter="E">E</span>
<span class="letter" data-letter="F">F</span>
$('span.letter').colorpicker().on('changeColor', function(event) {
$('span.letter').css('color', event.color.toString());
});