jQuery set value on specific table cell

Sam Deering

Helper JS function which sets the price on a specified table cell based on the table id, row id and column number.

function setRowPrice(tableId, rowId, colNum, newValue)
{
    $('#'+table).find('tr#'+rowId).find('td:eq(colNum)').html(newValue);
};

Win an Annual Membership to Learnable,

SitePoint's Learning Platform

No Reader comments

Comments on this post are closed.