views:

42

answers:

3

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!

A: 

You can specify a "duration" option in milliseconds

{duration:3000}
JacobM
+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
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
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
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