Monday, October 29, 2007

jQuery.ScrollTo 1.2 released


  • The option 'onafter' is now called 'onAfter'.
  • The option 'margin' can be setted to true, then the margin of the target element, will be taken into account and will be deducted.
  • Two axis can be scrolled together, this is setted with the option 'axis'.
  • In case 2 axis are chosen, the scrolling can be queued: one scrolls, and then the other.
  • There's an intermediary event, 'onAfterFirst' called in case the axis are queued, after the first ends.
  • If the option 'margin' is set to true, the plugin will take in account, the margin of the target(no use if target is a value).


  • If queuing is activated, the order of the axes ('xy' or 'yx') will tell the plugin, in what order to scroll the axis.
  • 'margin' will only be valid, if the target is a selector, a DOM element, or a jQuery Object.
  • If the first axis to be scrolled, is already positioned, that animation will be skipped, to avoid a delay in the animation.
Along with this release, jQuery.LocalScroll 1.0.1 is released. Changes:
  • 'onbefore' is now named 'onBefore', to keep jQuery.ScrollTo naming conventions.
  • A filter can be specified, so that only some of the suitable links are bound.



asdasdasdas said...

Great plugin man, it fits exactly what I'm trying to implement. However I have a little issue that must be related to the fact that is late in the night and I'm new to jquery:

I'm using jquery 1.2.3 and when the page first leades it(scrollTo) complains about jquery not being defined

jQuery is not defined
})( jQuery );
jquery.scrollTo.js (line 150)

and when I try to us it it fails saying that scrollTo is not a function



//which says again jQuery not defined.

Can you give me a pinter about this. I don't know what I'm doing wrong.

Thanks in advance

Any feedback would be appreciated.

Ariel Flesler said...


You probably mistyped the url of the script including jQuery.
Or maybe you mistyped the type="text/javascript".

Check if this isn't the problem, and otherwise, post a link to it so I can check.


Anonymous said...

Just wanted to say thanks for this plugin. But I did find a problem with the files that were packaged. When I tried to use your demo from my local Apache server, I kept getting the error "scrollTo not defined".

After trying all sorts of things try to understand why it wasn't working, I finally figured out the problem. Firebug was showing a 403 (forbidden) html error when it tried to download the scrollTo plugin. It turned out the permission on the jquery.scrollTo.js was set to 600 (I am running linux)!

Changed it to 644 and it is working now. So if anyone else gets this error, check your permissions.

Ariel Flesler said...

Hi Brian

Thanks for sharing, I'm on Windows so I wasn't quite aware of that.


Anonymous said...

enjoying this... trying to setup multiple local scrolls on one page... need some help in getting this working... can you add such an option to your demo? or what would I need to change in order to setup many such areas on one page? thanks, yonatan

Anonymous said...

hmm... looks like what I was using for the test was an older version... I'll re-study the demo (which has more than one area) as it looks like everything is already there... sorry for jumping too early... all the best

Ariel Flesler said...

Ouch, my last post got lost, will rewrite it shortly...

You can call the plugin many times, affecting different zones of the page like this.


Each time you call the plugin, all the (valid) links inside the given elements are affected.

$.localScroll() affects all the links on the page.

Anonymous said...

Big THANKS for the plugin!

But i would appreciate if u could give me a little hint why does all the links on page die on refresh in IE6 :( ?

sorry, no demo till i fix this :D

Ariel Flesler said...

I really don't know.
Let me know if you have some sort of demo to show me.

Anonymous said...

you could now see the demo here

ie6 only has this problem (on refresh the scrollTo anchors wont work), on other major browsers works like a charm...

Anonymous said...

demo is alive now at


Ariel Flesler said...

I currently don't have IE6 on this machine, just IE7 and it works ok.

Try removing the pngFix script and see if it keeps on failing. Those scripts add nasty hacks.

Unknown said...
This comment has been removed by the author.
Unknown said...

How to support tracking of anchor/hash using google analytics within ScrollTo?