From a8121e31e7e54629ead8a688e78aef06172bd814 Mon Sep 17 00:00:00 2001 From: Shea Dawson Date: Wed, 20 Feb 2013 17:24:05 +1100 Subject: [PATCH] MINOR scroll back up to top of comments list after pagination ajax has loaded a new page --- javascript/CommentsInterface.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/javascript/CommentsInterface.js b/javascript/CommentsInterface.js index 1b2bef6..53dd074 100755 --- a/javascript/CommentsInterface.js +++ b/javascript/CommentsInterface.js @@ -159,6 +159,9 @@ commentsList.hide().html(html.find('.comments-list:first').html()).fadeIn(); pagination.hide().html(html.find('.comments-pagination:first').html()).fadeIn(); commentsList.removeClass('loading'); + $('html, body').animate({ + scrollTop: commentsList.offset().top - 30 + }, 200); }, failure: function(html) { alert('Error loading comments');