2
I need when to delete a row from a list. it changes an input items.
Example:
linha 01
linha 02
linha 03
if I delete line two currently it gets:
linha 01
linha 03
but I didn’t want it that way I need it to change and leave like this:
linha 01
linha 02
so I thought I’d do it like this:
for (i = 1; i < quantidadeTR; i++) {
$("input:text[name^='item']").val(i);
}
quantityR = is equal to the line total taken by a function.
with the above code I have the result:
linha 02
linha 02
I tried that too but it makes the same mistake:
var count = 1;
while ( count < quantidadeTR ) {
$("input:text[name^='item']").val(count);
count++;
};
I don’t know exactly what’s in this table, but if it makes sense to replace it with an ordered list
<ol>
, the numbering would automatically adjust.– bfavaretto