Just want to get the table row data and pass it. In my code it seems that it only getting first row data.
$(".edit").click(function(){
var tableData = $('tr.table').children("td").map(function() {
return $(this).text();
}).get();
$('#test1').val($.trim(tableData[0]));
$('#test2').val($.trim(tableData[1]));
$('#test3').val($.trim(tableData[2]));
})
.editelement is contained in?$('tr.table').children("td")gets alltdelement of the whole table.