Parents selector in jQuery
<p>I need to get all elements whose n-th parent (i.e. elem.parent().parent()...parent()) has a specific class. Is that possible?</p>

<p>For example:</p>

<pre><code>&lt;div class="success"&gt;
  &lt;div id="depth-1"&gt;
    &lt;div id="depth-2"&gt;
      &lt;div&gt;Return me&lt;/div&gt;
      &lt;div&gt;Return me&lt;/div&gt;
  &lt;/div&gt;
 &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>the command with parent depth of 3 and class "success" will return the <code>"Return me"</code> divs.</p>
