Skip to content

weirdoonthebus/ShortTouch-LongTouch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Short Touch / Long Touch

jQuery script for capturing the length of a mousedown event.

Concept

I feel like in the future of web UI we will listen more often for short press or long press events in favor of user-agent specific interactions creating more consistent experiences across devices.

Like making hover's work on mobile, a short-tap can start the rollover/reveal animation, while a long-press actually follows the link.

This script is pretty basic, it just captures when a user has pressed for longer than 2.5 seconds. You can change that value to something else and add you own functions inside. Currently it just logs to console "short touch" and then "long touch".

Donate

If you enjoyed this project please consider sending me a couple dollars as a thank you for the work :)

PayPal · Venmo · KoFi

About

Capturing the length of a mousedown event in jQuery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published