detect object in dom jquery see if a table exists on html5 page by id

have a table that is created dynamiclly. need to see if its there, create it or append to it based on its existence.

 

Lets set a var usertableexists=false;

if($(“#mytableid”).length){usertableexists=true;}

console.log(“the table exist var is “+ usertableexists)

Leave a Reply