[jQuery] selector to .wrap multiple elements in HTML
I am trying to figure out how to select 3 elements that occur together
and wrap all 3 together (not individually) in a DIV tag. This is what
I have:
<h1>...</h1>
...
...
<h1>...</h1>
...
...
and I want to turn that into:
<div class='fade'>
<h1>...</h1>
...
...
<h1>...</h1>
...
...
</div>
I have tried using the ("h1 + p + p") with .wrap, but this seems to
detect the trio, but only wrap the last p. How can I make it wrap the
trio together?
Thanks!
-Adam