0

重複の可能性:
JQuery 効果の遅延

このスクリプトに約 1 秒の時間遅延を追加する方法を知っている人はいますか?

modcontentplatinummoreフェードアウトしてから約1秒後にフェードインするdivが欲しいですmodcontentplatinum

ありがとう。

<script>
$(".modcontentplatinummore").hide();
$('.morebutton-platinum').click(function () {
    if ($('.modcontentplatinummore').is(":hidden")) {       
        $('.modcontentplatinum').fadeOut(500);
        $('.modcontentplatinummore').fadeIn(500);
    } else {
        $('.modcontentplatinummore').fadeOut(500);
        $('.modcontentplatinum').fadeIn(500);
    }
});
</script>
4

2 に答える 2

2

アニメーション キューにタイムアウトを追加するdelayメソッドを使用するだけです。

于 2012-12-17T17:06:12.453 に答える
0

jquery で delay() を使用して遅延を追加できます。このリンクhttp://api.jquery.com/delay/を使用してください。

于 2012-12-17T17:13:01.997 に答える