Selecting first instance of class but not nested instances via jQuery
- by DA
Given the following hypothetical markup:
<ul class="monkey">
<li>
<p class="horse"></p>
<p class="cow"></p>
</li>
</ul>
<dl class="monkey">
<dt class="horse"></dt>
<dd class="cow">
<dl>
<dt></dt>
…