0

I am using the jQuery Plugin Smooth Div Scroll, it works perfectly fine but i would like the scrolling to start not immediately but after a delay of two seconds.

Here is how it looks like:

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

Here are all the options explained: http://www.smoothdivscroll.com/options.html

Could someone maybe take a quick look? I'm stuck unfortunately.

1 Answer 1

2

There's a public method startAutoScrolling, combine that with setTimeout:

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

    setTimeout(function() {
        $("#makeMeScrollable").smoothDivScroll("startAutoScrolling");
    }, 2000);
});
</script>
1
  • Worked very well! Thanks, @Mati.
    – Brightweb
    Jul 11, 2013 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.