mrblah mrblah - 7 months ago 12
Javascript Question

In jQuery, want to remove all HTML inside of a div

I have a div, and I want to remove all the HTML inside of that div.

How can I do this?

Answer

You want to use the empty function:

$('#mydiv').empty();