I have a series of elements (over 20) that all need a color that the user enters. Using PHP + CSS I end up with this output:
#one, #two, #three, #four, #five, #etc { color: #222; }
It works fine, but I now need to edit that color after the DOM has loaded using jQuery/Javascript. Again, it will be user entry so the color could be anything.
Is there a quick way to apply the changes to all the elements at once? Or do I have to do the following?
$('#one').css('color', newColor );
$('#two').css('color', newColor );
.... etc
I am hoping there is a way, because like I mentioned, there are over 20 elements that need this change. Thanks guys