<div id="outer"> <div id="container"> <div id="button-1"></div> <div id="button-2"></div> <div id="button-3"></div> </div> </div>
var outerDiv = document.getElementById("outer"); var pointerListener = new PointerListener(outerDiv, { supportedGestures : [Tap] }); function onTap (event) { // do something } var button_1 = document.getElementById("button-1"); button_1.addEventListener("tap", onTap); var button_2 = document.getElementById("button-2"); button_2.addEventListener("tap", onTap); var button_3 = document.getElementById("button-3"); button_3.addEventListener("tap", onTap);
var pointerListener = new PointerListener(domElement, { bubbles : false });
var tapRecognizer = new Tap(domElement, { bubbles : false });