Is there anyway that I can make it so the page will automatically scroll to the top after the content has loaded (via Ajax)?
This is the code I have for displaying the content:
$(document).ready(function () {
var my_layout = $('#container').layout();
$("a.item_link").click(function () {
$("#loader").fadeIn();
feed_url = $(this).attr("href");
$.ajax({
type: "POST",
data: "URL=" + feed_url,
url: "view.php",
success: function (msg) {
$("#view-area").html(msg);
$("#loader").fadeOut();
}
});
return false;
});
});
So after the 'view-area' has loaded its content can I make the page auto scroll to the top?