I want to colour some options in select field (HTML) using JS/Jquery based on the values of the select options assigned. Here is my code:
$('#selectField option[value="val1"]').css({ 'color': 'green' });
The code does its job perfectly in the Google Chrome and Internet Explorer, but in Mozilla Firefox nothing happens. Has anybody an alternative for this browser to suggest? The solution must be in JS not in CSS. Thank you!