Jquery – In jQuery I want to remove all HTML inside of a div

jquery

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

How can I do this?

Best Solution

You want to use the empty function:

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