onclick

0.1.0 • Public • Published

onClick.js Build Status

A click controller for mouse & touch.

  • Prevents 300ms delay on touch
  • Touch interactions like scrolling work as expected
  • Handles devices that have both touch and mouse
  • Delegates events for efficiency

Installation

npm install onclick

A jQuery-like selector library is required:

  • jQuery 1.4.3+
  • Zepto

Usage

onClick({
    '#element': function(e) {
        alert("I was clicked!");
    }
});
 
onClick('.myclass', function() {
 
});

Check out a live example.

Development

To Build: grunt build

To Develop: grunt watch

To Test: npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    10
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    10
  • 0.0.3
    0
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i onclick

Weekly Downloads

11

Version

0.1.0

License

MIT

Last publish

Collaborators

  • bpeacock