WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

jQuery Mobile Touch Events


Touch occasions are activated when the client contacts the screen (page).


jQuery Mobile Tap

The tap occasion is activated when the client taps on an element.

The following precedent says: When a tap occasion fires on a <p> component; conceal the current <p> element:

Example

$("p").on("tap",function(){
  $(this).hide();
});
Try it yourself »

jQuery Mobile Taphold

The taphold occasion is activated when the client taps on a component and hold for one second:

Example

$("p").on("taphold",function(){
  $(this).hide();
});
Try it yourself »

jQuery Mobile Swipe

The swipe occasion is activated when the client swipes over a component evenly by more than 30px:

Example

$("p").on("swipe",function(){
  $("span").text("Swipe detected!");
});
Try it yourself »

jQuery Mobile Swipeleft

The swipeleft occasion is activated when the client swipes over a component in the left heading by more than 30px:

Example

$("p").on("swipeleft",function(){
  alert("You swiped left!");
});
Try it yourself »

jQuery Mobile Swiperight

The swiperight occasion is activated when the client hauls over a component the correct way by more than 30px:

Example

$("p").on("swiperight",function(){
  alert("You swiped right!");
});
Try it yourself »