Simulate Hover Effect On Touch Devices – hover-on-touch

Category: Javascript , Recommended | April 28, 2020
Author:vin-ni
Views Total:3,093 views
Official Page:Go to website
Last Update:April 28, 2020
License:MIT

Preview:

Simulate Hover Effect On Touch Devices – hover-on-touch

Description:

A JavaScript library to simulate hover effect on touch devices that adds a CSS class (hoverontouch--aktiv by default) to an element on Tap Hold.

How to use it:

1. Insert the JavaScript file hoverontouch.js into the document.

<script src="js/hoverontouch.js"></script>

2. Initialize the hover-on-touch library.

var HoverOnTouch = new HoverOnTouch();

3. Apply a hover effect to your element on tap hold.

.hoverontouch--aktiv {
  /* your styles here */
}

You Might Be Interested In:


Leave a Reply