I have a set of menu like this:
<ul class="lavalamp">
<li>Menu 1</li>
<li>Menu 2</li>
<li>
Menu 3
<ul>
<li>Sub Menu 1</li>
<li>Sub Menu 2</li>
<li>Sub Menu 3</li>
</ul>
</li>
<li>Menu 4</li>
</ul>
I add a lavalamp effect on this. When I hover over any menu, the lavalamp background moves onto the hovered menu and it will move back to current menu if menu is not hovered.
The problem is, when I hover into the sub menus, it is considered not hovering the menu so the lavalamp background move back to the current menu item. To prevent this, I add a hover selector in my jquery.lavalamp.js like this:
$li.not(".back").hover(function() {
if (!$('.sub-menu').is(":hover")) {
move(this);
}
}, function(){});
function move(el) {
$back.each(function() {
$(this).dequeue(); }
).animate({
width: el.offsetWidth,
left: el.offsetLeft
}, o.speed, o.fx);
};
while move(this) is the function to move the lavalamp background to the hovered menu. It works well in every browser except in IE. The lavalamp background won't move and there is a javascript error called "unsupported pseudo :hover". I have searched in jquery site and it doesn't have a selector called :hover.
Are there any other way to replace the :hover selector above? Any help would be appreciated.
hover, which maps to those two. That's not what they're asking about.