Skip to content

Instantly share code, notes, and snippets.

@ambrosiora
Created April 8, 2019 11:26
Show Gist options
  • Save ambrosiora/d959c30e51540926831aa16ce96af24b to your computer and use it in GitHub Desktop.
Save ambrosiora/d959c30e51540926831aa16ce96af24b to your computer and use it in GitHub Desktop.
function scroll(speed) {
$('html').animate({ scrollTop: $(document).height() - $(window).height() }, speed, function() {
window.print();
});
}
$(document).ready(function(){
scroll(2000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment