Question: I'm using [hammer.js](http://eightmedia.github.com/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 but parent's event is also triggered and I don't want that.

```
$('#parent').hammer().bind('tap', function(e) {
    $(this).css('background', 'red');
});​​​​​​​​

$('#child').hammer().bind('tap', function(e) {
    e.stopPropagation();
    $(this).css('background', 'blue');
});

```

Here is an example: <http://jsfiddle.net/Mt9gV/>

​
I also tried with [jGestures](http://jgestures.codeplex.com/) and the issue seems to be the same.
How can I achieve this result with one of those library? (or another one if it is needed)

Answer: 
As I couldn't get this work, I used a variable to know if the child event has already been triggered. It works quite well with jGestures (I have not tried with hammer.js)

```
var childTriggered = false;

$('#child').bind('tapone', function(e) {
    $(this).css('background', 'red');
    childTriggered = true;
});

$('#parent').bind('tapone', function(e) {
    if(childTriggered) {
        childTriggered = false;
        return;                
    }
    $(this).css('background', 'blue');
});

```

​
You could try checking `e.currentTarget` (or is it `e.target`?) inside the parent handler to find out which element was tapped; if it's the child element then just return immediately, else continue with the function.