jairajs89/Touchy.js — Issue #3: feature idea/request: delegating events to a containerelement
Author: maerten
Created: 2012-02-19 18:52:47+00:00
State: open

Hi!

Binding Touchy.js on 40+ elements on iOS (iPhone 4) casues my webapps UI to hang for a few seconds. Using event delegation should speed things up.

Touchy(element, callback(hand, finger) {} );

could become:

Touchy(containerelement, cssSelector, callback(hand, finger, element) {} );

or something like

Touchy(containerelement, cssSelector, callback(hand, finger) {
// finger.element
} );

(or each finger could contain a new 'element' property to indicate the target of the original fingers' touchstart)