2.0.1 • Published 5 years ago

bind-click v2.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

bind-click

Attach a function to the click event while handling some edge cases that I like to address.

Notes

  • Pass in a Node, NodeList, or a string to select the target element
  • Fails gracefully if no elements are selected
  • If a string selector is passed in, the DOM is queried each time giving a "jQuery live"-ish behavior
  • Default event is click
  • Solves click issue on some older iOS touch screens

Basic Usage

bindClick(document.querySelectorAll('.button'),function (e) {
  console.log(e);
});

Requirements

2.0.1

5 years ago

2.0.0

5 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago