I've been reading this thread: Style parent li on child li:hover and trying to get it to work with my menu in this fiddle: http://jsfiddle.net/PJMyR/1/, but it keeps throwing syntax errors at me, and I can't figure out why.
Here is the code:
$('li.parent ul li').mouseenter(function() {
$(this).parent().closest('li.parent').addClass('highlighted');
}).mouseleave(function() {
$(this).parent().closest('li.parent').removeClass('highlighted');
});
Best regards Martin