Tuesday, January 22nd, 2008

jQuery ScrollTo Plugin

Category: JavaScript, jQuery

Ariel Flesler has a nice little jQuery plugin, ScrollTo, that lets you scroll with many configuration options:

  • Axes to be scrolled, ‘x’, ‘y’, ‘xy’ or ‘yx’.
  • Animation length (or by default, no animation)
  • Easing method
  • Whether to take in account, the margin of the target element
  • If both axes are chosen, whether to animate together, or queue the animations.
  • The possibility to add/deduct from the end position a defined amount of pixels.
  • If queing, a callback function to be called after the first scrolling.
  • A callback function to be called after the whole scrolling ended.

For example:


  1. $.scrollTo( '#options-examples', 800, {easing:'elasout'} );

We talked about scrolling in Prototype in the past.

Posted by Dion Almaer at 6:15 am

3.8 rating from 81 votes


Comments feed TrackBack URI

This looks like some solid work Ariel. Nice job.

Comment by leveille — January 22, 2008

Hi Dion, thanks for mentioning ScrollTo. I checked the link you added about Prototype. That looks very similiar to jQuery’s LocalScroll http://www.freewebs.com/flesler/jQuery.LocalScroll/

Comment by Flesler — January 29, 2008

This is absolutely useless. ScrollTo has many configuration options? Give some examples of usage, not just a line pulled from the website with absolutely no relevance or explanation.
If only blogs included actual useful articles which were helpful and not just filler for a mediocre blog to get indexed in search engines and get hits.

I bet the creator of this article doesn’t even know how to use jQuery, nevermind the ScrollTo plugin.

PS I love the spam filter, this article itself is spam.

Comment by adajoo — July 28, 2009

Leave a comment

You must be logged in to post a comment.