jquery元素绑定hover事件,判断鼠标移动进入和移除效果
jquery给元素绑定hover事件,在event事件中判断 鼠标移动进入和移除的效果!代码是:
|
1
2
3
4
5
6
7
8
9
|
$("#user-home-menu").live("hover",function(event){ if(event.type=='mouseenter'){ $(this).find("span").addClass("hover"); $(this).find("div").show(); }else{ $(this).find("span").removeClass("hover"); $(this).find("div").hide(); } }); |
THE END






