views:

18

answers:

1

I'm building a website with some touch events and need to know how to make my touch events* only work when only 1 finger is touching (*these events prevent default), but I want to disable these events and restore defaults when 2 fingers are touching (to allow zooming, and keep the 1 finger events from being confused by 2 fingers).

Example:

if (one finger is touching){
   // do these events
}

How do I go about doing this?

A: 

I can honestly say, I've never heard of someone trying to do this.

A quick google search found several websites with demos: http://google.com/?q=multitouch+javascript

This is the only one that looks like it works. From my experience with iPhone, it probably uses iPhones non-standard events so this won't work on Android out of the box: http://ajaxian.com/archives/iphone-web-multitouch-javascript-virtual-light-table

Drew