after 2 hours of searching I decided to ask my question.
I have a div:
I want to add a div inside th
Why not go even simpler with either one of these options:
$("#box").html('');
Or, if you want to append it to existing content:
$("#box").append('');
Note: I put the id="myid"
right into the HTML string rather than using separate code to set it.
Both the .html()
and .append()
jQuery methods can take a string of HTML so there's no need to use a separate step for creating the objects.