This time I will share jQuery Plugin and tutorial about jQuery Plugin For Triple Clicks Detection – tripleclick, hope it will help you in programming stack.
tripleclick is a very small jQuery plugin which listens for triple clicks and triggers an event after you click on an element three times. Click (or touch) three times within 1 second on the element to trigger.
How to use it:
1. The plugin requires jQuery library is loaded properly in the document.
1 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
2 |
< script src = "tripleclick.js" ></ script > |
2. Fire a function when the user click on a specified element three times in 1 second.
1 |
$( "#one" ).on( "tripleclick" , function () { |
3. Change the default threshold time.
1 |
$( "#one" ).on( "tripleclick" , { threshold: 5000 }, function () { |
This awesome jQuery plugin is developed by richadams. For more Advanced Usages, please check the demo page or visit the official website.