title: Jquery select parent li for a given a href
body: <p>Having a variable that can contain '#tab1'..'#tab4', How can I select and change the css style of the corresponding style.</p>
  
  <p>For example: if my variable is tab2; I have only to change the style of the li that have <code>&lt;a href="#tab2"&gt;16 cm&lt;/a&gt;</code></p>
  
  <p>That's my html code:</p>
  
  <pre><code>&lt;ul class="tabs"&gt; 
      &lt;li class="active"&gt;&lt;a href="#tab1"&gt;12 cm&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#tab2"&gt;16 cm&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#tab3"&gt;19 cm&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#tab4"&gt;8 cm&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Thanks for help.</p>