demo http://jsfiddle.net/h4ZQR/ or http://jsfiddle.net/byRRY/
Good API: http://api.jquery.com/scrollTop/
Please note: you can use: .animate({scrollTop: $("#whateverdiv").offset().top}); to go to specific sections of the page.
Hope this helps
HTML
<a href="#bottom" id="hulk">Click me to go to bottom</a>
the code
$("#hulk").click(function() { $("html, body").animate({ scrollTop: $(document).height() }, "slow"); });β
OR
$("a[href='#bottom']").click(function() { $("html, body").animate({ scrollTop: $(document).height() }, "slow"); return false; });β
Tats_innit
source share