I have a table need to populate with the values filled in single line and selectbox when user click Add Row button and give that row serial no. in table, also if user need to delete row he will check delete checkbox column in table then click Delete Row button to delete the row selected. here is attached screenshot of my table and fields.
my problem is values add in all rows. I need to make a table display values that user had entered in the signle line and select box fields.
$(".addRow").click(function(){
var Item1 = $('#q1 input').val();
var Item2 = $('#q2 input').val();
var Item3 = $('#q3 select').val();
$('#q8').click() //table add button$('.Tbl tbody tr').each(function () {
$(this).find('.tblItem1 input').each(function () {
var tblItem1 = $(this).closest('tr').find('.tblItem1 input')
var tblItem2 = $(this).closest('tr').find('.tblItem2 input');
var tblItem3 = $(this).closest('tr').find('.tblItem2 select');
tblItem1.val(Item1);
tblItem2.val(Item2);
tblItem3.val(Item3);});
});
});