Skip to content

Latest commit

 

History

History
56 lines (45 loc) · 1.2 KB

README.md

File metadata and controls

56 lines (45 loc) · 1.2 KB

JTouch

A javascript library for touch gestures .
Please check the demo on your tablet device .

Support gestures (One Or Two Fingers)

  • start,end
  • tap,doubletap,longtap,hold
  • flick,swipe
  • pinch,rotate

Usage

var objTouch = document.getElementById('touch');//get object
var Touches = JTouch(objTouch);//init JTouch
Touches.on('start',function(){
		  console.log('start');
	  }).on('end',function(){
		  console.log('end');
	  });

Touches.on('flick',function(evt,data){ console.log('flick'); switch(data['direction']){ case 'left' : Trans.next(); break; case 'right': Trans.prev(); break; } });

Demo

You can check it on your tablet device . (ipad,surface..)

http://liutian1937.github.io/JTouch/touch.html

Need translate.js album.js

http://liutian1937.github.io/JTouch/carousel.html

Need translate.js