I want to create a rule to match only on the following:
<ul id="root">
<li>
<a href="item.html">Root Menu Item</a>
</li>
</ul>
However it must not match if the "li" element contains another "ul" element:
<ul id="root">
<li>
<a href="#">Sub Menu</a>
<ul>
<li>
<a href="item.html">Sub Menu Item</a>
</li>
</ul>
</li>
</ul>
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.
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.