Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have to wait the length of the scroll again #25

Closed
alexmccabe opened this issue Nov 8, 2012 · 2 comments
Closed

Have to wait the length of the scroll again #25

alexmccabe opened this issue Nov 8, 2012 · 2 comments

Comments

@alexmccabe
Copy link

if($.browser.webkit) bodyelem = $("body")
else bodyelem = $("html,body")

$('.autoscroll').click(function() {
$(bodyelem).scrollTo(bodyelem.height(), 10000);
});

I am using this code to scroll to the bottom of the page. I have to wait the scroll time again after the scrolling has finished before being able to scroll again. So a total of 20s in this case.

This is on the latest FF version (16.0.2)

@flesler
Copy link
Owner

flesler commented Nov 8, 2012

You should not use html or body, that's something you delegate to the plugin.
Just try this:

$(window).scrollTo('max', 10000);

@alexmccabe
Copy link
Author

Right, that worked perfectly. It's an excellent plugin, I just had an issue implementing it correctly. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants