javascript - Angularjs mouse enter event -


i change ng-mouse enter event if user hoovered more second on spot event fire seems ng-model-options="{ debounce: 1000 }" not working event

any ideas ?

<button ng-mouseenter="myevent()" ng-mouseleave="myevent2()" > </button>   $scope.flag=false; $scope.myevent = function() { $scope.flag=true;   $timeout(function(){       if($scope.flag)     {       // logic here      }   }, 1000); }  $scope.myevent2 = function() {     $scope.flag=false; } 

here can set timeout on mouseenter, , check if flag made false mouse leave, logic execute if user has not done mouseleave 1 sec.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -