Keith Adler
Keith Adler

Reputation: 21178

How to detect if a Tap or Tap Hold occurs while scrolling in jQuery Mobile

Is there any way in jQuery Mobile to detect whether a Tap or Tap Hold is occurring during a scroll event? I keep getting phantom taps because I am scrolling.

Upvotes: 0

Views: 1171

Answers (1)

Geethanjali B L
Geethanjali B L

Reputation: 66

    $(document).on("taphold","selector",function(event){
        //do something you want on taphold event
    });
    $(document).on("tap","selector",function(event){
       //do something you want on tap event
    });

selector may be id/class selector of the element you want to handle tap/taphold event.

Upvotes: 2

Related Questions