mrblah mrblah - 8 months ago 14
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();