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>
精彩评论