Input em uma td com jquery
05/11/2018
0
Bom dia, gostaria de saber como faço para realizar inputs em uma <td> dinâmica com jquery.
$(".addRows"+n+"").on('click',function(){
//alert(n);
//Variável que recebe a linha que será adicionada na tabela.
var newRowContent = '<tr>';
newRowContent += '<td>'+n+' ENTREGA</td>';
newRowContent += '<td contenteditable="true" class="num_pedido" id = "numPedido" ></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td class="actions">';
newRowContent += '<button class="btn btn-large btn-danger removebutton" type="button">Remover</button> </tr>';
newRowContent += '</tr>';
$(newRowContent).appendTo($("#tab"+n+" > tbody"));
liveTableData.reset();
});
$(".addRows"+n+"").on('click',function(){
//alert(n);
//Variável que recebe a linha que será adicionada na tabela.
var newRowContent = '<tr>';
newRowContent += '<td>'+n+' ENTREGA</td>';
newRowContent += '<td contenteditable="true" class="num_pedido" id = "numPedido" ></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td></td>';
newRowContent += '<td class="actions">';
newRowContent += '<button class="btn btn-large btn-danger removebutton" type="button">Remover</button> </tr>';
newRowContent += '</tr>';
$(newRowContent).appendTo($("#tab"+n+" > tbody"));
liveTableData.reset();
});
Antônio Silva
Curtir tópico
+ 0
Responder
Posts
Clique aqui para fazer login e interagir na Comunidade :)