Last active
November 4, 2016 15:22
-
-
Save alkrauss48/c4ebfdc4924d766f2a4b to your computer and use it in GitHub Desktop.
jQuery Scrolling Animations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shift the page to a div. Replace 'target' with a jquery selector query. | |
$('html,body').animate({ | |
scrollTop: $(target).offset().top | |
}, 1000); | |
// Shift a div to your current browser window location - Replace 'target' with a jquery selector query. | |
$(target).animate({ | |
top: $(document).scrollTop() | |
}, 800); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment