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);
};

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

No Reader comments

Comments on this post are closed.