开发者

jQuery scrollTo/localScroll Speed Control?

I am making a vertically scrolling site, but local开发者_运维知识库Scroll is flying by way too fast. Is there a way to control it's speed?


When you initialize localScroll, be sure to pass in duration:

$.localScroll({ duration: 500 });

On the help page for localScroll it specifies that you can additionally use all the options from scrollTo


To use localScroll with speed AND easing: Import the jQuery, scrollTo, localScroll, and easing scripts. Then put this script under it:

<script type="text/javascript">
    $(function() {
        $('#nav').localScroll({
            duration: 3000,
            easing: 'easeOutQuint'
        });
    });
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜