README
Smart Touch
Smart Touch is an easy to use Javascript- Touch- Libary.
Note: You could use it without jQuery.
Install
cd <your_project_root_folder>
npm install smart-touch --save
Examples
Use this code before every example
Add to your HTML:
<!-- only for test cases! -->
<script src='https://rawgit.com/mulian/smart-touch/master/dist/boundle.js' language='javascript' type='text/javascript' />
// will add touch globaly to window.touch
// require('smart-touch'); //if you use browserify
var call = function(e) {
console.log(e);
}
Move two fingers from right edge (like Mac OS > show Notifications)
touch.on().fingers.eq(2).from.right().call(call);
Move three fingers to Top (like Mac OS show Mission Control)
touch.on().fingers.eq(3).move.toTop().call(call);
Move one or more fingers from left edge (like windows switch Apps)
touch.on().fingers.betweene(1,5).from.left().call(call);
Pinch in with four Fingers (like Mac OS > show Launchpad)
touch.on().fingers.eq(4).pinch.in().call(call);