1.0.1 • Published 8 years ago
jquery-mouse-exit v1.0.1
jquery-mouse-exit
jQuery collection plugin that triggers a 'mouseExit' event only when the mouse cursor has completely left the given element.
// init plugin
$(collection).mouseExit(options);
// handle event
$(collection).on('mouseExit', function(e, data) {
console.log(data.lostFocus, data.gainedFocus);
})Install
npm install jquery-mouse-exitOptions
delay- milliseconds in delay before triggering mouseExit event
Development
All tests are located in test.js.
Useful NPM scripts:
npm startfor local browser-sync development of gh-pagesnpm testruns tests & generates reports (see reports section below)npm run tddtest driven development: watches code and re-tests after any changenpm run buildcleans, lints, tests and minifies (called onnpm prepublishhook)
Execute npm run to view all available CLI scripts.
Reports
Each test run will generate the following reports:
/test_reports/coveragecontains Istanbul code coverage report/test_reports/htmlcontains HTML test report/test_reports/junitcontains JUnit test report
CI Build
https://travis-ci.org/makeup-jquery/jquery-mouse-exit
Code Coverage
https://coveralls.io/github/makeup-jquery/jquery-mouse-exit?branch=master