commit 82f2342a276033fbb075fcd181fcb9d3fb33e869 Author: HOG Date: Wed Mar 1 10:42:46 2017 +0200 Added scroll function after insert new elements. diff --git a/js/infinite-scroll.js b/js/infinite-scroll.js index b7dd41f..4f1b44b 100644 --- a/js/infinite-scroll.js +++ b/js/infinite-scroll.js @@ -45,6 +45,11 @@ // Replace the pager link with the new link and ajaxPageState values. $existingPager.replaceWith($newPager); + // Scroll to new elements. + $('html, body').animate({ + scrollTop: $newRows.offset().top + }, 800); + // Run views and VIS behaviors. Drupal.attachBehaviors(view.$view[0]); };