0
我想有一個有12個方格的網站,每個懸停時都會顯示12個新網格,並且希望在每個方格上放置一個延遲,這樣您就可以將它們懸停在另一個方格上,而無需觸發它們。有任何想法嗎?找到了幾個答案,但jQuery很新,似乎無法讓他們工作。這是我現在的代碼。提前Thanx。懸停延遲jquery
$(文件)。就緒(函數(){
$(".photo1").mouseenter(
function(e){
$(".photo1").fadeOut(500);
$(".photo2").fadeOut(500);
$(".photo3").fadeOut(500);
$(".photo4").fadeOut(500);
$(".photo5").fadeOut(500);
$(".photo6").fadeOut(500);
$(".photo7").fadeOut(500);
$(".photo8").fadeOut(500);
$(".photo9").fadeOut(500);
$(".photo10").fadeOut(500);
$(".photo11").fadeOut(500);
$(".photo12").fadeOut(500);
$(".photo1a").fadeIn(500);
$(".photo1b").fadeIn(500);
$(".photo1c").fadeIn(500);
$(".photo1d").fadeIn(500);
$(".photo1e").fadeIn(500);
$(".photo1f").fadeIn(500);
$(".photo1g").fadeIn(500);
$(".photo1h").fadeIn(500);
$(".photo1i").fadeIn(500);
$(".photo1j").fadeIn(500);
$(".photo1k").fadeIn(500);
$(".photo1l").fadeIn(500);
$(".portraits").fadeIn();
}
);
$(".photo1a").mouseleave(
function(e){
$(".photo1").fadeIn(500);
$(".photo2").fadeIn(500);
$(".photo3").fadeIn(500);
$(".photo4").fadeIn(500);
$(".photo5").fadeIn(500);
$(".photo6").fadeIn(500);
$(".photo7").fadeIn(500);
$(".photo8").fadeIn(500);
$(".photo9").fadeIn(500);
$(".photo10").fadeIn(500);
$(".photo11").fadeIn(500);
$(".photo12").fadeIn(500);
$(".photo1a").fadeOut(500);
$(".photo1b").fadeOut(500);
$(".photo1c").fadeOut(500);
$(".photo1d").fadeOut(500);
$(".photo1e").fadeOut(500);
$(".photo1f").fadeOut(500);
$(".photo1g").fadeOut(500);
$(".photo1h").fadeOut(500);
$(".photo1i").fadeOut(500);
$(".photo1j").fadeOut(500);
$(".photo1k").fadeOut(500);
$(".photo1l").fadeOut(500);
$(".portraits").fadeOut();
}
);
謝謝,得到它的工作!只有「問題」還是有,如果你動真快,我的意思是真快,OND關閉它保持可見的DIV。不知道是否有反正解決這個問題,但是再次感謝Mike。 – user2520747