Table creation using Jquery

var mytable = $('#table');
  if(bool===true && todelete!==undefined){

    var mytable=$('#table');

    mytable.deleteRow(todelete);

    bool=false;

    todelete=undefined;

  }

  //alert("in createtable");

  var row = mytable.insertRow(globalVariable++);

  var cell1 = row.insertCell(0);

  var cell2 = row.insertCell(1);

  var cell3 = row.insertCell(2);

  var cell4 = row.insertCell(3);

  var cell5 = row.insertCell(4);

  var cell6 = row.insertCell(5);

  var cell7 = row.insertCell(6);

—how do i convert the insertRow and insertcell to jquery ?

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

Look into how you might use the jQuery append method.