Работает ли что-то подобное?
JS:
function bindEventTouch(element) {
element.bind('tap taphold swipe swiperight swipeleft', function(event, ui) {
alert('Event: '+event.type);
});
}
// List of events: http://api.jquery.com/category/events/
function bindEvents(element) {
element.bind('click change dblclick submit', function(event) {
alert('Element Id: '+$(element).attr('id')+' Event: '+event.type);
});
}
//bindEventTouch($('#display-event'));
//bindEvents($('#display-event'));
$('.displayEvent').each(function(){
bindEvents($(this));
});
HTML
<div data-role="page" id="home">
<div data-role="content">
<div id="display-event-1" class="add-border displayEvent">
<p>Tap, TapHold (for 1 second), Swipe, SwipeRight or SwipeLeft</p>
</div>
<br />
<div id="display-event-2" class="add-border displayEvent">
<p>Tap, TapHold (for 1 second), Swipe, SwipeRight or SwipeLeft</p>
</div>
<br />
<div id="display-event-3" class="add-border displayEvent">
<p>Tap, TapHold (for 1 second), Swipe, SwipeRight or SwipeLeft</p>
</div>
</div>
</div>