We can solve this problem by Adding delay to window scroll event. If user is not scrolling for last one second, then We can confirm that the user stopped scrolling.

Script 

In this below script window was bonded to scroll event
Scroll event will be triggered after 1 second ( 1000 milli seconds)
function myCtrl($scope, $window, $timeout) {
   $scope._timeout  = null;
   angular.element($window).bind(
    "scroll", function() {
         if($scope._timeout){ //if there is already a timeout in process cancel it
          $timeout.cancel($scope._timeout);
         }
         $scope._timeout = $timeout(function(){
           $scope._timeout = null;
           alert('scroll stopped');
         },1000);
   });  
}

1 comment:

  1. Reading of the books is very good hobby. Many of the people adopt it but now a days many people read the books through the internet but they cannot get that information from internet which is in the book. Much information about the libararies is on best essay writing service uk which we can know easily when we start to take a look of it.

    ReplyDelete

Blogroll

Follow this blog by Email

Popular Posts