Target only the span of current row jQuery -
how target span of current row?did research closest
might work can't under stand usage table.
var spanid = $(this).closest('tr').next().find('span').attr("[name='wpc_subtotal']"); spanid.text(sum);
here fiddle.
just remove next code () refer next tr has value of 0 because don't change refer other element target.
var spanid = $(this).closest('tr').find('span').attr("[name='wpc_subtotal']");
Comments
Post a Comment