How to remove all div content but not div using jquery?
div contains a lot of UL, LI, DIV, H1s
<div id="container">
<ul>
<li>test</li>
<li>test</li>
</ul>
<div><h1>test</h1></div>
<div><h1>test</h1></div>
<div><h1>test</h1></div>
</div>
I would like to delete the entire contents of the container.
thank
source
share