I have a problem with a click propagation event.
let say, I have a situation like this in a table:
<tr><td><div><span>some text</span></div></td></tr>
when I click on the span, the click is propagated to the parent. I would like the click to be propagated to the parent div but not to the parent td and tr.
when I do
$("td").click(function(e) {
e.stopPropagation();
});
e refer to the span as that where the click originate. I'd like the click to start propagating but then stop at a specific object.
Thanks
EDIT:
we are using primefaces and the click event on the SPAN is automatically generated, so I don't really have access to it and I don't want to mess with primefaces code. The original click is on the span but I don't want it to propagate higher than a specific parent (in my example above the td). In fact I would like to stop the propagation on $(this) object, not on e