Possible Duplicate:
jQuery scroll To Element
Basically, I want my user to be instantly scroll down to a specific anchor tag just like they do with a hashtag. However, I can't use a hashtag and therefore want to scroll them down using javascript (preferably jquery).
Any thoughts on how to do this?
This will jump instantly to the element matched by $(selector)
:
$(document).scrollTop($(selector).offset().top);
If you want a fluid animation:
$(document.body).animate({'scrollTop': $(selector).offset().top}, duration);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With