2
In the catch line function I pick up the clicked line and send the data to the form and store OBJ from the line and get index tbm
var index = $(obj).closest('tr').find('td').eq('0').text();
Here after I changed the data I create the tr and pass the data to table, but it goes to final I wanted it to replace the line I had clicked, to breaking head and I can not find solution
var tr =
'<tr class="classeDaLinha">' +
'<td class="id" id="id" >' + id + '</td>' +
'<td class="name">' + name + '</td>' +
'<td class="qtde" >' +
'<input style="width:50px;" type="number" name="quant[' + id + ']" id="quant[' + id + ']" class="p_quant" value="' + qtde + '" onkeyup="updateSubtotal(this)" onchange="updateSubtotal(this)" data-price="' + price + '" />' +
'</td>' +
'<td class="num_modulos"> ' + num_modulos + '</td>' +
'<td class="obs_item"> ' + obs_item + '</td>' +
'<td class="price"> ' + price + '</td>' +
'<td class="subtotal">' + subtotal + '</td>' +
'<td><img src="' + BASE_URL + '/assets/images/delete.png" width="20" height="20" title="Delete" onclick="excluirProd(this)"/>\n\
<img src="' + BASE_URL + '/assets/images/edit.png" width="20" height="20" title="Editar" onclick="pegar_valor_linha_tabela_editar(this)"/></td>' +
'</tr>';
$('#products_table tbody').append(tr);
Vlw by help worked & #Xa; OBJ.Prev(). after(tr); //put the new tr before this OBJ.remove(); var counter = 1; $(".classeDaLine"). each(Function() { $(this).find("#id").html(counter); $(this).find(".p_quant").prop("name", "Quant[" + counter + "]); counter++; }); $(OBJ). Closest('tr'). show(); $('#id'). val('');
– Junior Ramoty
has as you of the look in this other question https://answall.com/questions/251275/pega-os-valores-das-colunas-da-linha-clicada-e-passar-inputs
– Junior Ramoty
@Juniorramoty At this very moment I can’t, but as soon as I can look at the question, yes.
– Isac