I have a function which gets the data from various input ( multiple values ) and populate into a table.
Here is the jquery snippet :
var row =1
$("input[name='product_id[]']").each(function() {
$rows[row].cells[0].innerText = $(this).val();
row = row+1;
});
row=1;
$("input[name='product_name[]']").each(function() {
$rows[row].cells[1].innerText = $(this).val();
row = row+1;
});
row=1;
$("input[name='manufacturer[]']").each(function() {
$rows[row].cells[2].innerText = $(this).val();
row = row+1;
});
row=1;
$("input[name='composition[]']").each(function() {
$rows[row].cells[3].innerText = $(this).val();
row = row+1;
});
I was wondering if I can combine multiple iterators into a single iterator ?
Thanks Kiran