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 general, these are just some of the headers with the content below them, I just need everything under the headers in the div like:
<h5>Title</h5> <div> <p> Content </p> <ul> <li>Item</li> <li>Item</li> </ul> <p> Content </p> </div>
I tried using the .wrap function for jQuery, but no luck, as there may be several type elements under the header tags, I found this question: jQuery wraps the element sets in a div that is very similar, but could not fit it into what I need someone can help me?
Thanks in advance!
source share