jQuery - rule for "does not contain element"
<p>I want to create a rule to match only on the following:</p>

<pre><code>&lt;ul id="root"&gt;
   &lt;li&gt;
      &lt;a href="item.html"&gt;Root Menu Item&lt;/a&gt;
   &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>However it must not match if the "li" element contains another "ul" element:</p>

<pre><code>&lt;ul id="root"&gt;
   &lt;li&gt;
      &lt;a href="#"&gt;Sub Menu&lt;/a&gt;
      &lt;ul&gt;
         &lt;li&gt;
            &lt;a href="item.html"&gt;Sub Menu Item&lt;/a&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
   &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>The event for the rule is a click() function on the "a" element, I have created the event as required but need it to only work on the root menu items.</p>

<p>I know I can just add an id attribute to target the desired element only but the menu plugin that my client has installed is not easily configurable.</p>
