I'm trying to create a scrolling effect where when the onclick
event is triggered, I want that div1
to scroll to dev2
. It should initially go slowly and then fast!.
Here's a website using this effect: http://community.saucony.com/kinvara3/
How do I do this?
Make use of ScrollTop with offset().top to scroll it to DIV nodes.
HTML
Do add a "active" class on DIV item which you want to show at first on page load. For me, it's the first DIV item.
JavaScript
Fiddle - http://jsfiddle.net/ideaovation/fhg1g974/3/
Will this do?? Please adjust the position of button(s) as per your requirement.
I've used jQuery mmin (1.11) and jQuery UI (1.11).