TouchOpen
All device( iOS Android and Dektop )
dragleft
dragRight
touchhold
touchtap
doubletap
swipeleft
swiperight
Example code
//Drag Rightvar dragright= Hammer( document.getElementById("touch-dragright") ); dragright.on("dragright", function(event) { if((event.gesture.deltaY<=5 && event.gesture.deltaY>=-5) && event.gesture.deltaX<-100){ $('nav#menu').trigger( 'open.mm' ); }});
Or you can use in all pages action( #wrapper )
var touchWrapper=document.getElementById("wrapper");if(touchWrapper){ var wrapper= Hammer( touchWrapper ); wrapper.on("dragright", function(event) { // hold , tap, doubletap ,dragright ,swipe, swipeup, swipedown, swipeleft, swiperight if((event.gesture.deltaY<=7 && event.gesture.deltaY>=-7) && event.gesture.deltaX >100){ $('nav#menu').trigger( 'open.mm' ); } }); wrapper.on("dragleft", function(event) { if((event.gesture.deltaY<=5 && event.gesture.deltaY>=-5) && event.gesture.deltaX<-100){ $('nav#contact-right').trigger( 'open.mm' ); } });}