Last active
December 20, 2015 09:40
-
-
Save cherihung/6109779 to your computer and use it in GitHub Desktop.
smooth scroll using jquery. a sample snippet that targets one defined href.
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
jQuery(document).ready(function(){ | |
var dpost = jQuery('#calloutpos').offset().top; | |
jQuery('#bottomslide').click(function(){ | |
jQuery('html, body').animate({scrollTop:dpos}, 'slow'); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment