I’m trying to wrap everything within the body in another div, except one div ID and everything inside it. I tried this:
$('div:not(#dontselect)').wrap('<div class="wrapper" />');
It sorta works, but everything inside #dontselect also get wrapped in .wrapper classes. I want #dontselect and everything inside it to remain how they were. Any help?
You can add another
:not:This excludes all
divdescendants of#dontselect.