Suppose I have the following
<ul>
<li>Item 1</li>
<li>Item 2
<ul>
<li>Sub Item</li>
</ul>
</li>
<li>Item 3</li>
</ul>
This list is auto-generated by some other code (so adding exclusive id's/class' is out of the question. Suppose I have some jquery code that states that if I mouseover an li, it gets a background color. However, if I mouseover the "Sub Item" list item, "Item 2" will be highlighted as well. How can I make it so that if the user mouses over "Sub Item" it only puts a background color on that and not on "Item 2" as well?
I also forgot to mention that I already have something like $("li").doSomething... on the page already...