I dynamically insert items into a table using the following function:
$("#inserir-item").click(function (){
...
$("table#tb-itens tbody" ).append(retorno);
}
The return variable contains something like:
"<tr id="tr-22-2222" align="center">
<td>22-2222</td>
<td align="left">Descrição IV</td>
<td>4</td>
<td>
<button type="button" value="22-2222" class="btn btn-primary">X</button>
</td>
</tr>"
Then, when I click on the button (inserted in the table using the function) I get no return.
Function used for button interaction:
$("table#tb-itens tbody tr button[type=button]").click(function (){
alert(this.value);
});