Fire mouse events when the user intends it
npm install hoverintenthoverintent
---
hoverintent is a reworking of Brian Cherne's jQuery plugin
in plain javascript. It has no dependencies.
It's goal is to determine a user's intention when hovering over an element by triggering a mouseover event when the cursor position
has slowed down enough.
Check out the demo to see how it works in action.
|
|
|
|
|
|
|:---:|:---:|:---:|:---:|:---:|
| All ✔ | All ✔ | 9+ ✔ | 7+ ✔ | All ✔ |
#### Adding hoverintent to an element
`` html`
#### Removing hoverintent from an element
` html`
` html`
| Setting | Default Value | Description |
| ---- | ---- | ---- |
| sensitivity |
sensitivity: 7| The value (in pixels) the mouse cursor should not travel beyond while hoverintent waits to trigger the mouseover event. |
interval: 100| The length of time (in milliseconds) hoverintent waits to re-read mouse coordinates. |
timeout: 0| The length of time (in milliseconds) before the mouseout
event is fired. |
| handleFocus | timeout: false
| Adds onOver/onOut callbacks to keyboard navigation during blur and focus events |$3
Add hoverintent as an internal chain method to your Ender compilation.` js
// ender add hoverintent$('.element').hoverintent(function() {
// Handler in
}, function() {
// Handler out
});
`$3
to manage dependencies and build. Development requires you
have node.js installed.
1. Install node.js. 'Install' will download a package for
your OS.
3. Run
npm install
4. Run npm run build` _____
< MIT >
-----
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||