質問

のを作りたい二つの機能がどの薄出要素になります。

これは何でしょうがないですが、この場合マウスを動かすがの推移元素で振動:|いつ、どのようにしていない振動作を確認してください。◆

<script language="javascript" type="text/javascript">
 function hoverIn(target, speed){
     $(target).fadeIn(speed); 
 }

 function hoverOut(target, speed){
     $(target).fadeOut(speed); 
 }
</script>

ライブプレビュー-チェックはこの問題を解決ライブ

役に立ちましたか?

解決

えいこうを使用するデスクリプトの主なものにしたいです .stop() 電話を停止する以前のアニメーション、このように:

<script type="text/javascript">
 function hoverIn(target, speed){
     $(target).stop(true, true).fadeIn(speed); 
 }

 function hoverOut(target, speed){
     $(target).stop(true, true).fadeOut(speed); 
 }
</script>

これはあくまでも未だ問題が mouseovermouseout 火災時の出入。しかし、 .hover() 用途 mouseentermouseleave ないが、同じ問題を排除し、"振動"の問題です。

のデ版は以下のようなものです:

$(function() {
  $("ul > li").hover(function() {
    $(this).find("ul").stop(true, true).fadeIn('fast');
  }, function() {
    $(this).find("ul").stop(true, true).fadeOut('fast');
  });
});​

ご覧はこちら, にも短いバージョン:

$(function() {
  $("ul > li").hover(function() {
    $(this).find("ul").stop(true, true).animate({opacity: 'toggle'}, 'fast');
  });
});​

できるこ, 注意これらすべてのデ組入れないでくださいインラインでjavascript、複数の子メニューを取り揃えております。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top