Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Latest commit

 

History

History
53 lines (40 loc) · 1.85 KB

README.md

File metadata and controls

53 lines (40 loc) · 1.85 KB

Build Status

jquery.multiclick

Bind to the multiclick event, a custom DOM-like event generated using jQuery's Special Events API. The multiclick event triggers when the user clicks within the bound element a configurable number of times.

Have you ever wished that browsers threw an event when a user clicked an element a certain number of times? (No? OK, me neither... but this made for a good demonstration.) If you are [or can be] using jQuery 1.7+, then this simple jQuery extension can grant that wish for you!

Getting Started

Check the jQuery Plugins Registry for the latest published version of this plugin!

You can also download the production version or the development version from GitHub.

In your web page:

<script src="jquery.js"></script>
<script src="dist/jquery.multiclick.min.js"></script>
<script>
    jQuery(selector).on("multiclick", { clicks: 3 }, callbackFunc);
</script>

Examples

// click, click, click, multiclick
jQuery(selector).on("multiclick", { clicks: 3 }, callbackFunc);
// click, click, click, click, click, multiclick
jQuery(selector).on("multiclick", { clicks: 5 }, callbackFunc);

Compatibility

Works 100% with jQuery versions:

  • 1.7.x
  • 1.8.x
  • 1.9.x

Untested jQuery versions:

  • Anything below 1.7.x (incompatible jQuery Special Events API)
  • 2.0.0b1

Documentation

(Coming soon)

Release History

  • 0.5.3: Published to the jQuery Plugins Registry on 2013-02-14.
    • Initial release, plus filename updates.