title: Setting option in select dropdown based on data-attribute
body: <p>I have a select dropdown containing a list of countries looking something like this:</p>
  
  <pre><code>&lt;select name="countryCode" id="countryCode"&gt;
  &lt;option data-countryCode="GB" value="44" Selected&gt;UK (+44)&lt;/option&gt;
  &lt;option data-countryCode="US" value="1"&gt;USA (+1)&lt;/option&gt;
  &lt;optgroup label="Other countries"&gt;
      &lt;option data-countryCode="DZ" value="213"&gt;Algeria (+213)&lt;/option&gt;
      &lt;option data-countryCode="AD" value="376"&gt;Andorra (+376)&lt;/option&gt;
  &lt;/optgroup&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I then look up the user's country using ipinfo.io and would like to set the selected option based on the returned country and the data-countryCode attribute. I have tried some different approaches, but I simply cannot get it to work.</p>
  
  <p>I have created a jsfiddle with the country-selector and the lookup:
  <a href="http://jsfiddle.net/E7fBk/" rel="nofollow">http://jsfiddle.net/E7fBk/</a></p>
  
  <p>How do I set the drop-down to show the user's country ?</p>
  
  <p>thanks</p>
  
  <p>Thomas</p>