Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hoverintent-jqplugin

olsonpm419MIT0.2.1

The popular 'hoverintent' library now available in npm

hoverIntent, jquery, plugin, hover, mouseover

readme

hoverintent-jqplugin

This is just Brian Cherne's hoverintent JQuery plugin made available in NPM.

I made two modifications to the library:

  1. It can now be imported via amd/csj/globally.
  2. Hoverintent requires activation by passing it either the jquery or window object. See example below.

Install

npm install --save hoverintent-jqplugin

Use

// cjs
var $ = require('jquery');
require('hoverintent-jqplugin')($); // <---------- Attaches itself to the jquery object

// amd
require(['jquery', 'hoverintent'], function($, hoverintent) {
    hoverintent($);
});

// global
<script src="jquery.js"></script>
<script src="hoverintent.js"></script>
<script>
  hoverintent(window); // will attach itself to window.jQuery
</script>

Clone and test

git clone git@github.com:olsonpm/hoverintent-jqplugin.git
npm install
npm test

Run CJS example

npm install
gulp run-cjs-example
// now open up chrome and visit http://localhost:8080/ to view the example

I can add more examples if people want them.

A minified version is also available in the /dist directory.