title: jQuery - add icon to select option based on value
body: <p>I am currently trying to make any use of Polylang, a Wordpress plugin that allows to add language switcher to the website.</p>
  
  <p>It currently generates simple select dropdown menu and changes the language upon selecting the language, so it's ok, however I am unable to style it properly - it's a raw dropdown menu.</p>
  
  <p>I would like to add icons next to the displayed option, and as far as I know jQuery is my best shot here.</p>
  
  <p>The issue I am having is that <code>&lt;option&gt;</code> tags are missing <code>id</code> or <code>class</code> tags, and it is impossible to add them without modifying the plugin itself.</p>
  
  <p>Is it possible to create a jquery script that will display a flag next to the option based on it's <code>value</code> attribute? </p>
  
  <p>Can you show me any example how to?</p>
  
  <pre><code>&lt;select name="lang_choice" id="lang_choice"&gt;
  &lt;option value="en"&gt;English&lt;/option&gt;
  &lt;option value="fr" selected="selected"&gt;French&lt;/option&gt;
  &lt;option value="de"&gt;Deutsch&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>