Is there a way to determine if a keyup elem -is not- a particular parent or that parents children?
<p>I can't seem to find a solution for this after hours of searching :-(</p>

<p>I've tried to no avail:</p>

<pre><code>jQuery('#someGlobalNav').delegate('*','keyup', function(){
   if(!(jQuery('#itemsForSale').find(jQuery(this))){// do something}

jQuery("#itemsForSale, #itemsForSale &gt; * ").focusout(function(){}
</code></pre>

<p>Tried using :not, and :contains. </p>

<p>Basically, I have a grouping of links. Lets use this below:</p>

<pre><code>&lt;div id="someGlobalNav"&gt;
&lt;ul id='siteNavigation'&gt;
&lt;li id="itemsForSale"&gt;
   &lt;div id="items"&gt;
      &lt;ul id='itemNav'&gt;
         &lt;li&gt;
             &lt;div id="menu1"&gt;
                &lt;ul&gt;
                   &lt;li&gt;&lt;a href="link"&gt;menu 1 item 1&lt;/a&gt;&lt;/li&gt;
                   &lt;li&gt;&lt;a href="link"&gt;menu 1 item 2&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
             &lt;/div&gt;
         &lt;/li&gt;
         &lt;li&gt;
              &lt;div id="menu2"&gt;
                &lt;ul&gt;
                   &lt;li&gt;&lt;a href="link"&gt;menu 2 item 1&lt;/a&gt;&lt;/li&gt;
                   &lt;li&gt;&lt;a href="link"&gt;menu 2 item 2&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
             &lt;/div&gt;
         &lt;/li&gt;
      &lt;/ul&gt;
   &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="link"&gt;Link that Might exist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="link"&gt;AnotherLink that Might exist&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;a href="somelink"&gt;Arbitrary link&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>everything is captured fine etc.. the only issue is, I want to ONLY act on elems that are NOT "itemsForSale" or its children. So, as a user keyups thru links, all is fine UNTIL they keyup on somethign outside of itemsForSale --</p>

<p>I figured to use :not - but I won't know the selectors as the nav is dynamic. I tried all sorts of other things no luck.</p>

<p>Any ideas</p>
