Using jQuery's empty() method, can I prevent a specific item from being removed from the DOM, and all other items removed?
For instance:
<div id="container"> <div id="noRemove"></div> ... more content ... </div>
When I make this call with jQuery $("#container").empty() , how can I prevent noRemove from being deleted while keeping the rest of the contents inside the container ?
source share