I need to search all checkboxes CHECKED of a <div>
where you have another <div>
daughter who is, has a <input type="checkbox">
via
jQuery
.
The structure follows:
<div class="metro perfil-filtro-expander-filtrados perfil-filtro-expander-overflow acoesFiltradas" id="acoesFiltradas">
<--! item 1 -->
<div style="padding-bottom: 10px;">
<input id="@item.SelectedValue" type="checkbox" />
<label for="@item.SelectedValue">
<b>@item.Title</b>
<br />
<span class="perfil-filtro-expander-descricao">
@item.Description
</span>
</label>
</div>
<--! item 2 -->
<div style="padding-bottom: 10px;">
<input id="@item.SelectedValue" type="checkbox" />
<label for="@item.SelectedValue">
<b>@item.Title</b>
<br />
<span class="perfil-filtro-expander-descricao">
@item.Description
</span>
</label>
</div>
<--! item 3 -->
<div style="padding-bottom: 10px;">
<input id="@item.SelectedValue" type="checkbox" />
<label for="@item.SelectedValue">
<b>@item.Title</b>
<br />
<span class="perfil-filtro-expander-descricao">
@item.Description
</span>
</label>
</div>
</div>
jQuery:
$("#copiarParaTodasAcoes").click(function () {
$(".acoesFiltradas :input:checked").each(function () {
alert('teste');
});
});
Button:
<a href="">
<img class="perfil-expander-botoes" id="copiarParaTodasAcoes" src="~/Images/tecbox/icons/expander-copy-icon.png" />
</a>