Skip to content

coulson84/touchJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

touchJS

A touchscreen API that goes hand-in-hand with transformJS

Usage

the interface of this library is subject to change - while every attempt will be made to keep documentation up to date, we can't guarantee that the documentation is 100% accurate

To listen for touch events on an elements simply pass an object to the touch function with the following properties:

  • element - a css selector string referring to the id or class of an element
  • types - an array of strings listing the types of events you are interested in
  • touchStartF - callback function for starting a touch gesture
  • touchMoveF - callback function for touch gesture moves
  • touchEndF - callback function for ending a touch gesture

E.g.

touch({
	element:'#box',
	types:['all'],
	touchStartF:function(e){
		console.log(e);
	},
	touchMoveF:function(e){
		console.log(e);
	}
});

About

A touchscreen API that goes hand-in-hand with transformJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •