Wednesday, March 11, 2009

jQuery.LocalScroll 1.2.7 released


I've pretty much stopped updating this blog, but the plugin development is still on-going. You can find the link to the Github project page at the bottom of the article.

In this release I cleaned up the code a little and added some features. Also removed a few old (aka deprecated) stuff that were still hanging around.


  • Added some misc enhancements and cleanup the code.
  • Updated the plugin to take advantage of recent scrollTo additions.


  • The element that triggered the scroll cannot be accessed anymore from within the onBefore, you can bind your own click (or w/e) to them in order to add a class or things like that.
  • settings.persistent is no longer supported (was deprecated).


  • The set of settings can be accessed from within the onBefore as the 'this'.
  • The hash (#foo) is set to the URL before scrolling, so the back button works accurately (when scrolling the window).
  • The option 'hash' doesn't make the window jump when scrolling overflown elements
  • $.localScroll.hash now resets the element scroll to (0,0) by default. You can set the setting 'reset' to false to avoid this.



«Oldest   ‹Older   201 – 210 of 210   Newer›   Newest»
Unknown said...

Great Examples! Thank you.

Just one note: to my mind the localScroll JS does not always work as expected. For example: scrolling from 1 to 2b should first scroll to 2 and then to 2b. Otherwise it's kind of disorientating.

Greetings from Germany, Klaus

darek said...

How to change the offset setting from within onBefore?

darek said...

This is functionality I want to achieve:

hash: true,
offset: {
top: -60,
left: 0
onBefore: function(e, anchor, $target) {
if (something) { = -100;


darek said...

Okkk, so can someone tell me at least if it is possible to change offset from within onBefore at all?

Mark said...

this plugin does not work with jquery 1.8.0 in chrome. see

Ariel Flesler said...

Have you tried using the latest version of scrollTo (

Unknown said...

Hi Ariel:
Fisrst of all, thanks for your work. I don't have any idea of JQuery but still is easy to understand and use!

I have just a question. Apologize if someone asked it before (I think I've read all comments and I didn't see it) and apologize also for my english.

Could I use ScrollTo or LocalScroll to load an url and then scroll to an id?

My example (i'm not using your code because I'd like to know first if it's possible or not)

I have this site:

There's a button called "cosassss" which scrolls to an id (#portfolio) in the same page. If I go to another section in this site, for example clicking CONTACTA button, then "cosasssss" doesn´t work any more beacuse a new page has been loaded and it only calls to an id, not an url+id.

Could I solve that with your plugin?

Thanks a lot for reading this and saludos from Spain!


Unknown said...


the plugin works fine, but I have a problem.
Through a normal link it works great, but I want control it also has a HTML5 animation.
At present it is in the animation like this:

Symbol.bindElementAction compid symbol name, ... , "click", function sym, s

window.location = '# contact'

Where do I need to change something so that now also scroll through the HTML5 animation work?

Thank you and please write me a mail via Google+

Unknown said...

Any idea why its shows a security error

The problem is happening in filter function.

function filter(){
return !!this.href && !!this.hash && this.href.replace(this.hash,'') == URI && (!settings.filter || $(this).is( settings.filter ));

I spend some good time on it but couldnt figure out the reason.. Can anyone help pleaes..

Unknown said...

Hi Ariel,
First of all I want to thank you for the great effort you made in making and giving support for this plugin.
I've a little strange problem with LocalScroll. It works perfectly in google chrome and IE but not in Firefox. You can see it here:

As a part of WordPress template it is used by the template to scroll the page whenever a menu link is clicked.
I spent very long time trying to figure it out but I really don't know what the problem is.

I can provide any information you need to help.

Thanks in advance :)

«Oldest ‹Older   201 – 210 of 210   Newer› Newest»