In jQuery how would I go about wrapping a repeatable set of elements with a div?
For example I have:
img
h4
p
img
h4
p
img
h4
p
I need to wrap each img, h4, p set with a div class="container". So it will look like:
<div> class="container"> img h4 p </div>
<div> class="container"> img h4 p </div>
<div> class="container"> img h4 p </div>
Any ideas on how I can achieve this as its driving me nuts! I keep getting nested div.containers! Thanks!