Hover on Touch: An alternative hover function on mobile devices.

A pure Javascript Plugin for an alternative hover function on mobile devices. It shows secondary information on »Taphold« and goes to a link on »Tap«.

When you touch an element, the cover is hidden and the secondary information is shown. If you release under 250ms the touch event is interpreted as a click and a redirection to the given link is triggered. Otherwise, if you hold longer, the event is interpreted as a »Taphold« and the cover is shown again on release. The user can read the secondary information while scrolling the page for example.

Download: https://github.com/vin-ni/hover-on-touch

Demonstration:

Plugin homepage:

Implementation:

Each element has an object wrapper with an info and a cover div. Add as many objects as you want.

<div class="object" data-triggerlink="https://www.example.com">
        <div class="info">
            //Put the secondary Information here
        </div>
        <div class="cover">
            // Put the cover Informaton here
        </div>
</div>

This Plugin requires Hammer.js. Add it before the plugin in your html:

<script src="http://hammerjs.github.io/dist/hammer.min.js"></script>
<script src="your/path/hoverontouch.js"></script>

Screenshots:

Country State City Drop Down in jQuery, AJAX

Dynamically Dependent country state city drop down box using jQuery, Ajax and PHP: This is commonly …

AJAX Post With jQuery and PHP

AJAX stands for Asynchronous JavaScript and XML. AJAX Post used to create faster, and more interacti…

How a Loop Through a JavaScript Object?

How a Loop through a JavaScript object?Javascript Objects are Variables Containing Variables.In Java…

How to Search Item in List in JavaScript

Multi Step Form Using HTML and JavaScript

Form is the important part in web design. Form is the primary interface to the user by which user is…

How to Create Custom CSS, jQuery Autocomplete Plugin

Web developers often use autocomplete features in websites as a part of their work. Yet lot of good …