title: How can I get all <li> elements where <span class="x"> using jQuery?
body: <p>How can I get all list elements having a <code>&lt;span&gt;</code> element with <code>class="required"</code></p>
  
  <pre><code>&lt;form id="aform"&gt;
    &lt;ul&gt;
      &lt;li id="name" &gt;
        &lt;label class="description" for="name"&gt;Name&lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;div&gt;
          &lt;input id="brand_name" name="brand_name" class="text textfield50pc" type="text" maxlength="40" value="&lt;?php echo $brand-&gt;name; ?&gt;"/&gt; 
        &lt;/div&gt; 
      &lt;/li&gt;
    &lt;/ul&gt;    
  &lt;/form&gt;
  </code></pre>