Reputation: 251
In this table, the row has a event in jquery and execute it when i click in the row, inside of the row there are a div... these div has too a event and this execute when i click in the div. but when i click in the div too execute the event of the row....
<table>
<tr id="one">
<td>
<div id="two">
Hellow world
</div>
</td>
</tr>
</table>
So, when i click in the div, i want execute only the event of the div. how?
Upvotes: 0
Views: 165
Reputation: 9764
Use jquery, and make sure you pass "event" as parameter to the function
$(document).on('click', '.desplegar' , function(event) {
.................
event.stopPropagation();
});
this will prevent bubbling up of events.
Upvotes: 1