Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Alt #1 : get top offset of an element
- $('html,body').animate({
- scrollTop: $('#element').offset().top
- }, 1000);
- // Alt #2 : exact value scroll, ex: y=500
- $('html,body').animate( {scrollTop: 500 }, 1000);
Advertisement
Add Comment
Please, Sign In to add comment