title: Jquery get element containing child element with specific html value
body: <p>I would like to use Jquery to add a class to "li" element that contains a "span" element with a html/val equal to zero.</p>
  
  <p>For Example if my code looks like this:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;span&gt;Item 1&lt;/span&gt;&lt;span class="num"&gt;30&lt;/span&gt;&lt;/li&gt;
      &lt;li&gt;&lt;span&gt;Item 2&lt;/span&gt;&lt;span class="num"&gt;0&lt;/span&gt;&lt;/li&gt;
      &lt;li&gt;&lt;span&gt;Item 3&lt;/span&gt;&lt;span class="num"&gt;20&lt;/span&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I want to change it to the following:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;span&gt;Item 1&lt;/span&gt;&lt;span class="num"&gt;30&lt;/span&gt;&lt;/li&gt;
      &lt;li class="disabled"&gt;&lt;span&gt;Item 2&lt;/span&gt;&lt;span class="num"&gt;0&lt;/span&gt;&lt;/li&gt;
      &lt;li&gt;&lt;span&gt;Item 3&lt;/span&gt;&lt;span class="num"&gt;20&lt;/span&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>In the past I have used code to check elements attribute values, but never their html/val doing something to this effect...</p>
  
  <pre><code>$('li').has('span.num').addClass('disabled');
  </code></pre>
  
  <p>However in this case that would result in:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li class="disabled"&gt;&lt;span&gt;Item 1&lt;/span&gt;&lt;span class="num"&gt;30&lt;/span&gt;&lt;/li&gt;
      &lt;li class="disabled"&gt;&lt;span&gt;Item 2&lt;/span&gt;&lt;span class="num"&gt;0&lt;/span&gt;&lt;/li&gt;
      &lt;li class="disabled"&gt;&lt;span&gt;Item 3&lt;/span&gt;&lt;span class="num"&gt;20&lt;/span&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Which is obviously not going work... Thanks</p>