tags:

views:

31

answers:

1

I have a menu within a page, I have an active class applied to the relevant menu item in relation to the page.

This active class is reused when another menu item is hovered over, and is removed from the original menu item.

How can I make the menu <div> refresh when I .mouseout from #menu?

+2  A: 
$(function() {
    $("#menu").mouseout(function(){
      // refresh logic here
    });
});

Mouseleave is also an option, depends on your situation. Read Shawn's comment ...

Fabian
Any idea how to refresh a single <div>
danit
Sure, you're going to have to tell us what you mean by refresh tho :)
Fabian
Reload the contents (HTML) of the #menu <div>
danit
You may want to use the mouseleave event instead so you don't run into the problem of mouseout firing when hovering over children of #menu.
Shawn Steward
It wil be easier to just make the necesarry changes using jquery (adding and removing classes from your items)
Fabian