I have the following HTML:
- A
- subsection
- B
<
I don't think your problem has been completely addressed (although there has been some good attempts). Your example problem deals with applying a style to a parent and preventing the child from inheriting the style -- which is a CSS problem.
You could target the list items by knowing the parent element (as some have noted). Then add a class on hover.
$('div > ul > li').hover(function(){
$(this).addClass('myHover');
},
function(){
$(this).removeClass('myHover');
});
And your CSS would have the class for the parent, and a negating style for the children:
.myHover { font-weight: bold; }
.myHover li { font-weight: normal; }