This is just Brian Cherne's hoverintent JQuery plugin made available in NPM.
I made two modifications to the library:
npm install --save hoverintent-jqplugin
// cjs
var $ = require('jquery');
require('hoverintent-jqplugin')($); // <---------- Attaches itself to the jquery object
// amd
require(['jquery', 'hoverintent'], function($, hoverintent) {
hoverintent($);
});
// global
<script src="https://github.com/olsonpm/hoverintent-jqplugin/raw/master/jquery.js"></script>
<script src="https://github.com/olsonpm/hoverintent-jqplugin/raw/master/hoverintent.js"></script>
<script>
hoverintent(window); // will attach itself to window.jQuery
</script>
git clone git@github.com:olsonpm/hoverintent-jqplugin.git
npm install
npm test
A minified version is also available in the /dist directory.