I\'m using hammer.js and it appears that I event.stopPropagation()
doesn\'t work with tap event.
If I click on the child, the associated event is triggered
If you can't get this to work.. just call another method on the tap after verifying the needful (arguments.callee
is where I would start in such a case) , this would have the added benefits of letting other users hook the button also...
function myFn(a) { if(a) $(this).css('background', 'red'); else $(this).css('background', 'blue');}
$('#parent').hammer().bind('tap', function(e) {
//Check arguments.callee or other data in event and call myFn
});
$('#children').hammer().bind('tap', function(e) {
//Same here
});