mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
MINOR scroll back up to top of comments list after pagination ajax has loaded a new page
This commit is contained in:
parent
ca638e367a
commit
8b66d9fda6
@ -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');
|
||||||
|
Loading…
Reference in New Issue
Block a user