Skip to content

kubukoz/angular-on-hold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

angular-on-hold

Mousedown interval event handler directive.

Installation

Bower

bower install angular-on-hold

index.html

<script src="angular.js"></script>
<!--other modules-->
<script src="{{repositoryRoot}}/angular-on-hold.js"></script>
<!--other modules-->
<script src="app/main.js"></script>

main.js

var app = angular.module("myApp", ["kzHold"]);

#Usage main.js

app.run(['$rootScope', function($rootScope){
  //...
  $rootScope.someFunction = function(){
    console.log("triggered click");
  };
  //...
}])

template.html

<ANY kz-hold="someFunction" kz-hold-frequency="180">click me</ANY>

#Attributes

  • kz-hold - required, specifies the function called every time a hold event is triggered
  • kz-hold-frequency - optional, specifies the amount of times kz-hold function is triggered per second. 180 by default.

About

Mousedown interval event handler directive.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published