Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery Mobile swiperight event

jQuery Mobile swiperight event

jQuery Mobile Events jQuery Mobile Events

Example

On an element

swipe horizontally to the right to hide it:

$("p").on("swiperight",function(){

  $(this).hide();

});

Try it »


Definition and Usage

The swiperight event is triggered when dragging more than 30px horizontally to the right (less than 75px vertically) within one second.

Related events:


Syntax

$("

selector

").on("swiperight",function(event){...})

Parameters Description
function(event) Required. Specifies the function to execute when the swiperight event is triggered.
 该函数有可选的事件对象 ,事件对象可以是任何 jQuery 事件属性 (例如 event.target, event.type, 等)。更多信息请查阅 [jQuery 事件参考手册](/jquery/jquery-ref-events.html) 。 |


More examples

Event Object
Use the event.target property to return the DOM element that triggered the swiperight event.


jQuery Mobile Events jQuery Mobile Events