I have an html structure that looks like this:
<h5>Title</h5>
<p> Content </p>
<ul>
<li>Item</li>
<li>Item</li>
</ul>
<p> Content </p>
<h5>Title</h5>
<p> Content </p>
<ul>
<li>Item</li>
<li>Item</li>
</ul>
<p> Content </p>
In summary it's just some headers with content below them, I just need everything below the header tags in a div like this:
<h5>Title</h5>
<div>
<p> Content </p>
<ul>
<li>Item</li>
<li>Item</li>
</ul>
<p> Content </p>
</div>
I've tried using the .wrap
function of jQuery but no luck since there can be multiple types elements below the header tags, I found this question: jQuery wrap sets of elements in div which is very similar but haven't been able to fit it into what I need, can anyone help me?
Thanks in advance!