$(document).ready(function() { $(document).on('click', '#up', function() { $("body, html").animate({ scrollTop: 0 }, 500); return false; }); $(document).on('click', '#down', function() { $("body, html").animate({ scrollTop: $('body').height() }, 500); return false; }); });
<a href="" id="down">Abajo</a> <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> <a href="" id="up">Arriba</a>