Can anyone help me to convert JavaScript to jQuery? The JavaScript code is:
function addRow()
{
var table = document.getElementById("table2");
var numOfRows = table.rows.length;
var numOfCols = table.rows[numOfRows-1].cells.length;
var newRow = table.insertRow(numOfRows);
for (var j = 0; j < numOfCols; j++) {
newCell = newRow.insertCell(j);
newCell.innerHTML = "add";
}
}