JQuery - select entire element except one specific element nested inside
<p>is there a possibility to select an element but without one of the elements thats nested inside, if id-s of both elements are known?</p>

<p>like:</p>

<pre><code>&lt;div id="outerdiv"&gt;
    &lt;div&gt;
        &lt;div id="innerdiv1"&gt; &lt;/div&gt;
        &lt;div id="innerdiv2"&gt; &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>i want to do a select which would return the outerdiv but without innerdiv2 like this:</p>

<pre><code>&lt;div id="outerdiv"&gt;
    &lt;div&gt;
        &lt;div id="innerdiv1"&gt; &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>is there a statement like $('#outerdiv').not('#innerdiv2') or something that would do the trick? 
i can solve this using clone() + remove(), but im just wandering is there a chance to do it this way..</p>

<p>thanks</p>
