scroll page to top after ajax success 1

scroll page to top after ajax success

$('body').ajaxSuccess(function() {
  $('html, body').animate({ scrollTop: 0 }, 'slow');
}); 

Here is what the above code is Doing:
1. When the page loads, it will scroll to the top of the page.
2. When an AJAX request is made, it will scroll to the top of the page.

Similar Posts