jQuery plugin that creates a bindable special event for a configurable number of clicks: "multiclick". FOR DEMO PURPOSES ONLY!
JavaScript CSS HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
libs
src
test
.gitignore
.jshintrc
.npmignore
.travis.yml
CONTRIBUTING.md
Gruntfile.js
LICENSE-MIT
README.md
multiclick.jquery.json
package.json

README.md

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.