title: Add class to dropdown option
body: <p>Here is my html code</p>
  
  <pre><code>&lt;select class="input"  id="shopperlanguage" name="shopperlanguage"&gt;
  &lt;option selected="" value="ja_JP"&gt;日本語&lt;/option&gt;
  &lt;option value="en"&gt;English (International)&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I want to add two classes to each option like when if value is ja_JP then need to add japImg class and if value is en need to add engImg class to that option. value is by default set and i can not access the code i need to do it by jquery or java script.</p>
  
  <p>I have tried this code but its adding classes only when i select ja_JP option from dropdown. I need to add it without selecting drop down menu just check value of option and add that class.</p>
  
  <pre><code>&lt;script  type="text/javascript"&gt;
   var e = document.getElementById("shopperlanguage"); 
   var strUser = e.options[e.selectedIndex].value;
   if(strUser=="ja_JP"){
   $("#shopperlanguage").find("option").addClass("japimg");
   &lt;/script&gt;
  </code></pre>
  
  <p>this code is adding class only when that option containing value ja_JP is selected. I need to add classes just by checking the option value.Can i do this using css like any condition is css to check option value and add css rules?</p>