There is HTML:
<div id="block"> <div class="block"> <div class="block_item"></div> <div class="block_item"></div> </div> </div> If the window size is less than 600px, then the internal blocks are wrapped in a .block_wrapper block.
<div id="block"> <div class="block"> <div class="block_wrapper"> <div class="block_item"></div> <div class="block_item"></div> </div> </div> </div> It is necessary when the window size is greater than or equal to 600px to remove the wrapping element. How to do this without using unwrap() , deleting an element by its selector? When using unwrap() , all parent elements are gradually removed as the browser window is gradually increased.