Adds an event handler to an element. eventName should not include the "on" prefix.
Namespace:
C1.Web.iPhoneAssembly: C1.Web.iPhone.Client (in C1.Web.iPhone.Client.dll)
Syntax
JavaScript |
---|
C1.Web.iPhone.TouchEventDispatcher.addHandler = function(element, eventName, handler); |
Parameters
- element
- Type: DOMElement
DOM element that will raise event.
- eventName
- Type: System..::..String
Name of the event. Available events: "touchstart", "touchmove", "touchend", "touchcancel", "gesturestart", "gesturechange", "gestureend", "swipestart", "swipechange", "swipeend"
- handler
- Type: System..::..Object
The event handler.
Examples
C1.Web.iPhone.TouchEventDispatcher.addHandler(element, "gesturechange", gesturechangeHandler);
function gesturechangeHandler(e) { ... }