I want to select all elements between two given elements. I have html like this ...
<h2>This is firsty</h2> <p>Some para</p> <ul> <li>list items</li> <li>list items</li> <li>list items</li> <li>list items</li> <li>list items</li> </ul> <h2>Secondy</h2> <p>More text</p>
I want to select everything: from the first h2 to the second h2 , so I can wrap it in a div , as a result, all sections in their own shell.
source share