mouseenter
mouseenter shim utility
Last updated 7 years ago by shtylman .
MIT · Original npm · Tarball · package.json
$ cnpm install mouseenter 
SYNC missed versions from official npm registry.

mouseenter

mouseenter event emulation

mouseenter(element, fn)

var mouseenter = require('mouseenter');
var div = document.querySelector(...);

mouseenter(div, function(ev) {
    console.log('the mouse is here');
});

unbind

mouseenter returns a function you can use to no longer react to mouseenter events. Call this function and the previously bound event will be unbound.

var unbind = mouseenter(div, function(ev) {
    console.log('the mouse is here');
});

// will listen for mouseenter events

// call `unbind` to stop listening
unbind();

testing

$ npm run test-local

Then open the url it gives you in a local browser.

Licence

MIT

Current Tags

  • 1.0.0                                ...           latest (7 years ago)

1 Versions

  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |