Socket
Socket
Sign inDemoInstall

live-event

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    live-event

Live event binding in the DOM using plain JavaScript.


Version published
Maintainers
1
Install size
2.67 kB
Created

Readme

Source

live-event

Live event binding in the DOM using plain JavaScript. This repo is based on this article http://stackoverflow.com/questions/9106329/implementing-jquerys-live-binder-with-native-javascript and all credit goes to OP.

##Install:

npm install live-event

##Usage With browserify or webpack:

var live = require('live-event');

live('click', '.target', function (event) {
  console.log(event);
});

##API live(eventType, querySelector, callback) -> undefined ###eventType Required

Tpye: String

A DOM event.

###querySelector Required

Type: String

A querySelector String.

###callback Required

Type: Function

Event handler function.

##Supported browsers http://caniuse.com/#search=querySelector

Keywords

FAQs

Last updated on 15 Dec 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc