title: Find first parent and add class via jQuery
body: <p>HTML:</p>
  
  <pre><code>&lt;div class="views-row views-row-10 views-row-even views-row-last"&gt;    
    &lt;div class="sonuc"&gt;        
      &lt;span&gt;text1&lt;/span&gt;  
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="views-row views-row-11 views-row-even views-row-last"&gt;    
    &lt;div class="sonuc"&gt;        
      &lt;span&gt;text2&lt;/span&gt;  
    &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>JS:</p>
  
  <pre><code>if ($(".sonuc").has(":contains('text1')").length) {
    $('.sonuc').parent().addClass('hobi')
  }
  </code></pre>
  
  <p>Its work but add <code>hobi</code> class all parent divs. But I want add only text1's parent div. How can I fix it?</p>