Last active
October 10, 2015 19:27
-
-
Save lucien144/05a8314c366c1b017559 to your computer and use it in GitHub Desktop.
Slide to HTML element
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
$('html, body').animate | |
scrollTop: $("#element").offset().top | |
, 2000 |
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
<script> | |
$(document).ready(function() { | |
$('html, body').animate({ | |
scrollTop: $("#element").offset().top | |
}, 2000); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment