Hoverable
Configs
12
Configs
12A CSS class to add to the target element to enable CSS animations. This class is added after calling hoverEnter.
The number of milliseconds to delay notification of changes in the hoverTarget.
This property is a string containing one character for each edge that is hoverable. For example, a value of "tb" indicates that the top and bottom edges are hoverable.
When hoverEdges is used, this value determines the size (in pixels) of the edge. When
the cursor is within this number of pixels of an edge listed in hoverEdges, the appropriate CSS class
is added to the hoverTarget:
b-hover-topb-hover-rightb-hover-bottomb-hover-left
Depending on the values of hoverEdges, it is possible to have at most two of these classes present at
any one time (when the cursor is in a corner).
An element to ignore. Mouse entry into this element will not trigger a change in either of the hoverElement or hoverTarget values.
A CSS class to add to the root element.
The outer element where hover tracking will operate (attach events to it and use as root limit when looking for ancestors).
A common choice for this will be document.body.
A selector for the closest API to determine the actual element of interest. This selector is used to process changes to the hoverElement to determine the hoverTarget.
The currently active hover target. This will be the same as hoverElement unless there is a hoverSelector.
Set to true to include tracking of mousemove events for the active hoverTarget. This
is required for the hoverMove method to be called.
Properties
2
Properties
2Functions
4
Functions
4This method is called when the cursor enters the hoverTarget. The hoverTarget will not be
null.
| Parameter | Type | Description |
|---|---|---|
leaving | HTMLElement | The element that was previously the |
This method should return true if the given element should be ignored. By default, this is true if the
element is contained inside the hoverIgnoreElement.
| Parameter | Type | Description |
|---|---|---|
element | HTMLElement |
This method is called when the cursor leaves the hoverTarget. The hoverTarget may be null
or refer to the new hoverTarget
| Parameter | Type | Description |
|---|---|---|
leaving | HTMLElement | The element that was previously the |
This method is called when the mouse moves within a hoverTarget, but only if enabled by the hoverTrack config.
| Parameter | Type | Description |
|---|---|---|
event | Event |