title: Search the options of a select, find the value, add selected to it and write it's html text on a div
body: <p>I have a simple select, a div and a prepopulate variable.</p>
  
  <p>Here is what I want to do:</p>
  
  <p>I have the prepopulate value, lets say:</p>
  
  <pre><code>prepop = 2;
  </code></pre>
  
  <p>I want to search all the options in the select, add the attribute selected to the option with value 2 and write "Val two" on the div test:</p>
  
  <pre><code>&lt;div id="test"&gt;&lt;/div&gt;
  
  &lt;select&gt;
  &lt;option value="1"&gt;Val one&lt;option&gt;
  &lt;option value="2"&gt;Val two&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Any ideas how?</p>
  
  <p>Here are my thoughts:</p>
  
  <pre><code>var $options = "get all the select options";
      $options.each(function(){
          if (jQuery(this).val() == prepop){
              jQuery('#test').html(jQuery(this).text());
          }
      });
  }
  </code></pre>