I try to empty() a div but exclude a specific selector.
What I’ve tried so far:
$('.modal').find('.close').nextAll().empty();
$('.modal').find(':not(.close)').empty();
$('.modal').not('.close').empty();
$('.modal:not(.close)').empty();
HTML:
<div class="modal">
<a href="#" class="close">Close</a>
...I've the need to be removed...
</div>
Could be done like this:
http://fiddle.jshell.net/KLh4E/11/