title: jQuery - if select option value equal with a data add class
body: <p>I have a select box with 3 option, and a div with 3  that they has data attribute.
  now i want each option that has selected=seclected and also value (number) equal with a data then add class to </p>
  
  <p><strong>for example:</strong></p>
  
  <p>if option selected / and value = with  data:</p>
  
  <pre><code>&lt;option value="2" selected="selected"&gt;
  </code></pre>
  
  <p>do (add class):</p>
  
  <pre><code> &lt;a class="menuitem active" data="2"&gt;&lt;/a&gt;
  </code></pre>
  
  <p><strong><a href="http://jsfiddle.net/d3g8qsph/5/" rel="nofollow">JSFiddle</a></strong></p>
  
  <pre><code>$("#myselect option").each(function(){
      var num = $('.menucontainer').children('a.menuitem').attr('data');
          if($(this).is(':selected').val()==num){ 
              $('.menucontainer').children('a.menuitem').addClass('active');
              }
          });
      });
  </code></pre>