How to set different colors for different options in a select with jQuery
<p>I'm trying to generate a 'select' with a different color for each 'option' with jQuery.</p>

<p>I did that:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript" src="jquery-1.4.2.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;select id="taxonomy" name="taxonomy"&gt;&lt;/select&gt;

&lt;script type="text/javascript"&gt;
$(document).ready(function() {
    $('#taxonomy').append($('&lt;option&gt;&lt;/option&gt;').val('-ANY-').html('-- ANY --'));
    $('#taxonomy').append($('&lt;option&gt;&lt;/option&gt;').val('Critical').html('Critical'));
    $('#taxonomy').append($('&lt;option&gt;&lt;/option&gt;').val('Warning').html('Warning'));

    $('#taxonomy option[value="Critical"]').css('color', 'red');
    $('#taxonomy option[value="Warning"]').css('color', 'orange');
});

&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Unfortunately, it's only working on Firefox. There is no color in Chrome or Safari...</p>

<p>Do you have better solution working on any browser ?</p>

<p>Thanks.</p>
