Question

http://subzerostudio.com/temp/verticalscroller/scroller/scroller.html

Here's the fullscreen vertical scrolling site.. I've only tested it in FF so could well be buggy..

Assuming it actually works, I now want to add easing and speed, I've tried this:

    $('html,body').animate({
        duration: 6000,
        easing: 'easeOutElastic',
        scrollTop: $("#"+id).offset().top}
        );

but the duration has no effect and easing doesn't seem to be working either.. any ideas?

Was it helpful?

Solution

Your animation syntax is incorrect.

$('html body').animate({
    scrollTop: $("#"+id).offset().top
}, 6000, 'easeOutElastic');

As you have it, you're telling jQuery to animate the duration and easing properties of the body, which don't exist.

http://api.jquery.com/animate/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top