jQuery Mobile taphold event
Examples
Tap <p> element and hold (about one second), hide it:
$("p").on("taphold",function(){
$(this).hide();
});
$(this).hide();
});
try it"
Definition and Usage
Tap taphold trigger event does not release (about one second) after.
grammar
$ ( "Selector") .on ("taphold", function (event) {...})
parameter | description |
---|---|
function (event) | have to. Function is executed when the specified swipe event trigger. The function has an optional event object, the event object can be any jQuery event properties (such as event.target, event.type, etc.). For more information, please refer jQuery Event Manual . |
More examples
Event objects
Use event.target property to return the DOM element taphold event trigger.