MINOR scroll back up to top of comments list after pagination ajax has loaded a new page

This commit is contained in:
Shea Dawson 2013-02-20 17:24:05 +11:00
parent 58961df27e
commit a8121e31e7

View File

@ -159,6 +159,9 @@
commentsList.hide().html(html.find('.comments-list:first').html()).fadeIn(); commentsList.hide().html(html.find('.comments-list:first').html()).fadeIn();
pagination.hide().html(html.find('.comments-pagination:first').html()).fadeIn(); pagination.hide().html(html.find('.comments-pagination:first').html()).fadeIn();
commentsList.removeClass('loading'); commentsList.removeClass('loading');
$('html, body').animate({
scrollTop: commentsList.offset().top - 30
}, 200);
}, },
failure: function(html) { failure: function(html) {
alert('Error loading comments'); alert('Error loading comments');