Get data from a table using jquery
function GeAppointmentMiscData() {
var services;
var table = $("#servicesTable tbody");
table.find('tr').each(function(i) {
var $tds = $(this).find('td'),
id = $tds.eq(0).text(),
fee = $tds.eq(2).text(),
discount = $(this).find('input').val();
// do something with productId, product, Quantity
var item = id + "-" + fee + "-" + discount + ";";
});
var services;
var table = $("#servicesTable tbody");
table.find('tr').each(function(i) {
var $tds = $(this).find('td'),
id = $tds.eq(0).text(),
fee = $tds.eq(2).text(),
discount = $(this).find('input').val();
// do something with productId, product, Quantity
var item = id + "-" + fee + "-" + discount + ";";
});
No comments: