다음 기능은 작동하지만 호버에 반응하는 속도가 매우 느립니다. 기본적으로 나는 "드롭 다운"이있는 페이지의 중간에있는 탐색기를 가지고 있습니다. 그러면 사용자가 페이지의 맨 위로 스크롤 할 때 탐색기는 끈적 거리고 "드롭 다운"됩니다. 하지만 내가 말했듯이, 호버에 반응하는 것은 매우 느리고 왜 이유가 확실하지 않습니다.jQuery 호버 기능이 매우 느리게 실행되는 경우
$('.main-navigation li a').hover(function() {
if ($('.main-navigation').hasClass('main-nav-pos')) {
$('.main-nav-pos li a').hover(
function() {
//display heading and caption
$(this).children('.nav-info').animate({"height":"100%"}, 100);
$(this).children('.nav-info').animate({"top":"-105%"}, 'fast');
$(this).children('.butterfly').css({"display":"block"}, 'slow');
},
function() {
//hide heading and caption
$(this).children('.nav-info').animate({"height":"0"}, 100);
$(this).children('.nav-info').animate({"top":"0%"}, 'fast');
$(this).children('.butterfly').css({"display":"none"}, 'slow');
}
);
} else {
$('.main-nav-fixed li a').hover(
function() {
//display heading and caption
$(this).children('.nav-info-fixed').animate({"height":"100%"}, 100);
$(this).children('.nav-info-fixed').animate({"top":"105%"}, 'fast');
},
function() {
//hide heading and caption
$(this).children('.nav-info-fixed').animate({"height":"0"}, 100);
$(this).children('.nav-info-fixed').animate({"top":"0%"}, 'fast');
}
);
}
})
너가하는 중첩 된 호버에서 올 수 있습니다. –