너무 오랫동안 열어 둔 상태에서 메뉴를 만들려고합니다. 그런 다음 부모 또는 메뉴가 일정 기간 동안 마우스 오버되지 않은 경우 사라집니다..not()이 제대로 작동하지 않습니다.
메뉴에서 다른 상위 항목을 강조 표시하면 이미 존재하는 상위 항목을 제외하고 다른 모든 메뉴가 닫힙니다. 이 경우
<script>
$(".dropdown").mouseover(function() {
//Highlighting over the parent "dropdown" closes all other popup menus &
//displays the popup related to the parent
$(".menu-popup").not(this).find(".menu-popup").hide();
$(this).find(".menu-popup").fadeIn("fast");
//Reset the timer to hide popup if scrolling back over parent
//before time runs out
if (hideTimer !== null) {
clearTimeout(hideTimer);
}
});
//Scrolling off of the dropdown parent will set a timer that will
//hide the menu-popup
$(".dropdown").bind("mouseout", function(){
hideTimer = setTimeout(function(){
$(".menu-popup").fadeOut("fast");
}, 300);
});
</script>
'$ ("메뉴 팝업.")하지 ($ (이) .find ("메뉴 팝업.")) (숨길) 수 있습니다,...' – Satpal
@Satpal $ ("드롭 다운 ") .not (this) .find (". menu-popup "). hide(); 더 쉬울 것입니다. –
@AnoopJoshi, 질문을 완전히 이해하지 못하여 '맞을 수 있습니다.' 그래, 그게 ^^^^ 쉽게 될 것 같습니다. – Satpal