0

リンク上でマウスを高速で動かすと、マウスオーバーの問題が発生することがあります。マウスが動かない場合にのみループし、動かない場合は停止する方法があります。

       $('ul.display li').hover(function() {

        $('ul.display li').find('#details').hide(); // hides all deatils div before showing
        $('#light').delay('800').fadeIn("fast"); // shows div that fades out all other content.

if($.cookie("switch_thumb") =="thumb_view" || $.cookie("switch_thumb") =="null"){//checks for cookie set for display type
      $(this).find('#details').delay('900').animate({width:'toggle'}); // grow width
}else{
      $(this).find('#details').delay('900').animate({height:'toggle'}); // grow height
}


      }, function() {

           $('#light').fadeOut("fast"); // dim the light to show all content
        $('ul.display li').find('#details').hide(); //hide all details
   return false; // supposed to stop looping.

      });
4

2 に答える 2

0

チェックアウト.stop()方法

于 2010-06-12T12:18:42.007 に答える
0

私はかつて同様の問題を抱えていました。stop()も機能しますが、私が行ったのは、フェードを開始するときに要素にクラス「inmotion」を追加し、フェードが完了するとそれを削除することでした。そのタグがオンになっているときにホバー呼び出しを無視することで、次のアクションを開始する前にすべてのアクションを終了する必要がありました。

于 2010-06-12T12:20:48.600 に答える