Fade views content on views ajax pager action in Drupal 7

Last updated on 08/06/2014
 
Drupal.behaviors.ajaxPagerFadeContent = {
    attach: function(context, settings) {
      $('ul.pager', context).ajaxStart(function() {
        $(this).parents('.view').find('.view-content', context).fadeTo(300, 0.5);
      });
      $('ul.pager', context).ajaxSuccess(function() {
        $(this).parents('.view').find('.view-content', context).fadeTo(300, 1.0);
      });
    }
  };