For example, to scroll to a certain element on the page (ie here: How to go to a specific element on page?)
$("#fromTHIS").click(function() {
$("html, body").animate({ scrollTop: $("#toTHIS").offset().top }, 500);
return true;
});
I've tried both and they both look that they are doing the job. What am I missing?