wrapping non-nested elements
Hiya,
I would like to wrap the elements in this structure:
- <h4>header1</h4>
- <p> some text</p>
- <p> some more text</p>
- <h4>header 2</h4>
- <p>text</p>
so I would get two divs, each conatining the h4 and however many p's there are underneath.
- and there are up to 10 of these blocks, so I can't do it manually.
I tried some nextAll and nextUntil but couldnt get it to work.
And since I am new to jQuery I am not even sure if it can be done...?
Hoping for help
Andreas