Hey guys, I'm making a vertically scrolling site, but localScroll is flying by way too fast. Is there a way to control it's speed? Thanks!
+2
A:
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
Doug Neiner
2010-07-03 03:04:44
Hey guys, you're right, but you forgot to mention you need to load the easing plugin (http://gsgd.co.uk/sandbox/jquery/easing/) before you can call duration (or so it seems).
w1sh
2010-07-03 03:15:56
Easing is not specified in the default settings anywhere, so you should be able to do `{duration: 500, easing: "swing"}` and have it work w/o the easing plugin.
Doug Neiner
2010-07-03 14:55:49
A:
To use localScroll with speed AND easing: Import the jQuery, scrollTo, localScroll, and easing scripts. Then put this script under it:
$(function() { $('#nav').localScroll({ duration: 3000, easing: 'easeOutQuint' }); });
w1sh
2010-07-03 03:32:28