Ask your Question

Play online Skills Quiz

PEOPLE YOU MIGHT KNOW

Chris
Chris

Outlook Send Receive Error | How to fix it?

Alpharetta,  United States
io
io

top 10 BPO Services Provider Companies in Delhi

delhi,  India
digitalio
digitalio

delhi,  India
iodigital
iodigital

delhi,  India
io
io

top 10 BPO Services Provider Companies in Delhi

delhi,  India

Write to us

Ask Question

Preventing ghost click when binding touchstart and click(Ghost clicks in mobile browsers)

What is ghost Clicking?
In any touch device, mobile browsers emulate click events when the screen is touched.

 

What happend when the screen is taped?

A touchstart event is fired as soon as a finger touches the screen.A touchend event is fired as soon as the finger leaves the screen, then the browser waits around 300ms for another tap.If not, a click event is fired. This is the ghost click.

 

How to Prevent this?

$('#div').on('touchstart', function(e) {
    alert('touch');
    e.preventDefault();
});

0   0
Shailesh Kumar

List Your Business

Improve Your Business Visibility

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site