Notice
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.
Enhancements
- Added some misc enhancements and cleanup the code.
- Updated the plugin to take advantage of recent scrollTo additions.
Changes
- 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).
Features
- 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.
208 comments:
«Oldest ‹Older 201 – 208 of 208 Newer› Newest»Ariel,
How to change the offset setting from within onBefore?
This is functionality I want to achieve:
$('#menu').localScroll({
hash: true,
offset: {
top: -60,
left: 0
},
onBefore: function(e, anchor, $target) {
if (something) {
offset.top = -100;
}
}
});
Okkk, so can someone tell me at least if it is possible to change offset from within onBefore at all?
this plugin does not work with jquery 1.8.0 in chrome. see http://bugs.jquery.com/ticket/12410
Have you tried using the latest version of scrollTo (1.4.3.1)?
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: www.elbotonrojo.es/elpuntodelai
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!
:)
Hello,
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+
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:
http://tasweek-online.com/clients/ViaArabia/
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 :)
Post a Comment To get help prepare a demo.