I have a div and in it some elements, this div needs to be clickable and that its click will do an action, but, its elements that some are buttons also have own actions, what happens is that when I click on the elements, function of the element but also called the function of the div.
DIV example:
<div class="detalhes" id="2">
teste
<button class="Remove" remove_item="a" >
texto
</button>
</div>
<div class="detalhes" id="3">
teste
<button class="Remove" remove_item="a" >
texto
</button>
</div>
DIV function:
$(".detalhes").click(function()
{
var reg = $(this).attr("id");
});
Element:
$('body').on("click", ".Remove", function()
{
var Remove_item = $(this).attr("Remove_item");
});