mrblah mrblah - 1 year ago 67
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();