Question

I have been using the ScrollTo script (jquery.scrollTo-1.4.3.1-min.js) to smoothly scroll to each post on a wordpress blog. Since newer versions of jQuery, this code has stopped working. Here is where I originally found the code:http://webdesignerwall.com/tutorials/scrollto-posts-with-jquery

Does anyone have a suggestion or better method for getting this functionality?

Here is a fiddle, the prev, next links should elicit scroll to the neighboring .post divs

http://jsfiddle.net/bTfKk/

Was it helpful?

Solution

It's missing the easings, so when you remove those it works. From:

$.scrollTo(scroll, {
     duration: 300, easing:'easeOutExpo'      
});

to:

$.scrollTo(scroll, {
     duration: 300
});

FIDDLE

Or you can add jQuery UI or just the easings library : http://jsfiddle.net/bTfKk/2/

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