$.each not finding inserted rows
Hello,
Im trying to $.each through a set of <tr class="row">. I have inserted rows that I do through:
- var $plus = $(this).closest("tr").clone();
- $html = '<tr class="row"><td>' + $andor + '</td>';
- $html = $html.trim() + $plus[0].cells[0].outerHTML ;
- $html = $html.trim() + $plus[0].cells[1].outerHTML ;
- $html = $html.trim() + $plus[0].cells[2].outerHTML ;
- $html = $html.trim() + $plus[0].cells[3].outerHTML ;
- $html = $html.trim() + '<td> </td></tr>';
- $(this).closest("tr").after($html);
- $(".row").each(function(x) {
- var var0 = $.trim($(this).closest("tr").find(".andor").val());
- var var1 = $.trim($(this).closest("tr").find(".hidval").val());
- var var2 = $.trim($(this).closest("tr").find(".select").val());
- var var3 = $.trim($(this).closest("tr").find(".selval").val());
- });
But the $.each isnt finding the inserted row.