0

jQuery Plugin Smooth Div Scroll を使用していますが、問題なく動作しますが、スクロールをすぐに開始するのではなく、2 秒後に開始したいと考えています。

これがどのように見えるかです:

<script type="text/javascript">
$(document).ready(function () {
    $("#makeMeScrollable").smoothDivScroll({
        mousewheelScrolling: "allDirections",
        manualContinuousScrolling: true,
        autoScrollingMode: "onStart"
    });
});
</script>

説明されているすべてのオプションは次のとおりです。 http://www.smoothdivscroll.com/options.html

誰かが簡単に見てもらえますか?残念ながら立ち往生しています。

4

1 に答える 1

2

public method があり、それを次のようstartAutoScrollingに組み合わせsetTimeoutます。

<script type="text/javascript">
$(document).ready(function () {
    $("#makeMeScrollable").smoothDivScroll({
        mousewheelScrolling: "allDirections",
        manualContinuousScrolling: true
    });

    setTimeout(function() {
        $("#makeMeScrollable").smoothDivScroll("startAutoScrolling");
    }, 2000);
});
</script>
于 2013-07-10T23:04:40.353 に答える