hover-js

1.0.4 • Public • Published

hover-js

Library to add class to elements when user mouse is over another element.

Usage

Load as ES6 module

Load module

import hoverPlugin from 'hover-js';

Load as script

Load the script file.

Then do the following:

var hoverPlugin = hover_js.default;

Usage

You can start it

hoverPlugin.start()

also if you want to stop it, you can use hovePlugin.stop()

use data-hover and data-hover-target attributes on Your HTML to apply the class that is under data-hover to the elements that satisfied selector specified on data-hover-target.

Example

https://codepen.io/soyto/pen/qgPLrr

Readme

Keywords

Package Sidebar

Install

npm i hover-js

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

18.9 kB

Total Files

7

Last publish

Collaborators

  • soyto