0
我在菜單上有一個mouseover和一個mouseout事件,它顯示/隱藏了一個下拉菜單。刪除一個事件並重新設置它
此下拉菜單中有一些其他菜單項,我希望(單擊時)刪除顯示菜單的目標上的鼠標移出事件。但是一旦點擊了另一個目標,我希望再次啓用此事件。我希望我解釋得很好。
這是JavaScript:
$(document).ready(function() {
$("#menu ul > li").not(".parenttocurrent").not(".current").mouseover(function() {
$(this).find(".menu_content").stop().fadeTo('fast', 1).show();
}).mouseout(function() {
$(this).find(".menu_content").stop().fadeTo('fast', 0, function() {
$(this).hide();
});
});
});
我需要停止鼠標移開時這種情況下,如果被點擊的項目之一。您可以在此處看到演示:http://arcticbusinessnetwork.com.web18.curanetserver.dk/home.aspx