jquery-plugin-xclick is a jQuery plugin that allows you to set up an onclick event handler that runs every x time an element is clicked. Helpful for discovering triple clicks. xclick is a jQuery plugin that handles an advanced click event that enables you to perform a function when an item is clicked a specific number of times.
javascript trigger click event, javascript trigger click event on element, trigger change event javascript, jquery trigger click only once
How to make use of it:
1. Load the core JavaScript file index.js
after jQuery.
<script src="/path/to/cdn/jquery.slim.min.js"></script> <script src="/path/to/index.js"></script>
2. Attach the function xclick
to the component and set the variety of clicks that trigger the event.
<button id="example"> Click Me 2 Times </button>
$(function(){ $('button').xclick(2, () => { alert('Clicked 2 times in a row!'); }); });
Trigger An Event When Clicking X Times, jquery-plugin-xclick Plugin/Github
See Demo And Download
Official Website(Yash-Singh1): Click Here
This superior jQuery/javascript plugin is developed by Yash-Singh1. For extra Advanced Usages, please go to the official website.
Be First to Comment