Home / Mobile / Tappable - invoke the tap event for touch-friendly
Tappable - invoke the tap event for touch-friendly

Tappable - invoke the tap event for touch-friendly

Download Demo
  • Overview
  • Documents
User Rating: 0/5 ( 0 votes)
Your Rating:

Tappable is a simple, standalone library to invoke the tap event for touch-friendly web browsers. Currently it's only tested on iOS Mobile Safari.

Why 'tap'?

First, it would be wise to read the articles linked above to understand the purpose of this script. But if you're lazy, take a look at this diagram:

Diagram 1

So, that's the tap event. But wait the minute, I can just use the touchend event tosimulate a tap, right? Wrong, because:

Diagram 2

This means that once the finger moves, it will not fire the tap event. However, Tappable works in two special cases. First is the normal case:

Diagram 3

When the page scrolls, the button is not tapped.

The second case is the noScroll mode, where moving your finger on the element will not make the page scroll. This is useful for mobile web apps which might implement their own fixed headers or sections on the page.

Diagram 4

The button is tapped when the finger is on top of the button, even after moving in and out.

Scroll To Top