title: Changing the color of <option> in firefox
body: <p>I'm trying to change the text color of the option that is selected. It's working in IE but not in Firefox.</p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt;
        &lt;script type="text/javascript"&gt;
           $(document).ready(function(){
              $("option:selected").css("color", "green");
           });
        &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;select id="mySelect"&gt;
        &lt;option selected="selected"&gt;option 1&lt;/option&gt;
        &lt;option&gt;option 2&lt;/option&gt;
        &lt;option&gt;option 3&lt;/option&gt;
     &lt;/select&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>UPDATED</strong></p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html&gt;
     &lt;head&gt;
           &lt;script type="text/javascript"&gt;
           $(document).ready(function(){
              $("select").css("color", "green").focus(function() {
                      $(this).css('color', 'black');
                  }).blur(function() {
                  $(this).css('color', 'green');
              });
           });
        &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;select id="mySelect"&gt;
        &lt;option selected="selected"&gt;option 1&lt;/option&gt;
        &lt;option&gt;option 2&lt;/option&gt;
        &lt;option&gt;option 3&lt;/option&gt;
     &lt;/select&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>UPDATED 2</strong></p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html&gt;
     &lt;head&gt;
          &lt;style type="text/css"&gt;
              select.green{
                color: green;
              }
              option {
                color: black;
              }
          &lt;/style&gt;
          &lt;script type="text/javascript"&gt;
              $(document).ready(function(){
                  var green = $('option:selected', 'select').data('green');
                  if (green) {
                      $('select').addClass('green');
                  }
                  $('select').change(function() {
                      var green = $('option:selected', this).data('green');
                      if (green) {
                          $('select').addClass('green');
                      }
                      else {
                          $('select').removeClass('green');
                      }
                  });​
               });
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;select id="mySelect"&gt;
              &lt;option selected="selected" data-green="true"&gt;option 1&lt;/option&gt;
              &lt;option&gt;option 2&lt;/option&gt;
              &lt;option&gt;option 3&lt;/option&gt;
          &lt;/select&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>