jQuery rule for removing all elements, if any of its child element at any depth has a specific class
<p>What's the simplest rule which takes this DOM:</p>

<pre><code>&lt;div&gt;
    &lt;ul&gt;
        &lt;li&gt;  
            &lt;div&gt;
                &lt;a href="#" class="remove"&gt;link&lt;/a&gt;
            &lt;/div&gt;
        &lt;/li&gt;
        &lt;li&gt;  
            &lt;div&gt;
                &lt;span class="ok"&gt;&lt;/span&gt;
            &lt;/div&gt;
        &lt;/li&gt;
        &lt;li&gt;  
            &lt;div class="remove"&gt;&lt;/div&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>and removes all <code>&lt;li&gt;</code> elements, if any of them has a child at any depth which contains <code>"remove"</code> class. The result html is shown below:</p>

<pre><code>&lt;div&gt;
    &lt;ul&gt;
        &lt;li&gt;  
            &lt;div&gt;
                &lt;span class="ok"&gt;&lt;/span&gt;
            &lt;/div&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>
