开发者

Refresh menu on .mouseout

开发者 https://www.devze.com 2022-12-25 14:50 出处:网络
I have a menu within a page, I have an active class applied to the relevant menu item in relation to the page.

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 r开发者_高级运维emoved from the original menu item.

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


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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消