[jQuery] How to surround All content after a specified HTML attribute H2?
I am trying to look through content in a div and if i find an H2 or
whatever attribute the content or HTML that follows it will be
encloded in a div with a class. I will do this for every H2 so if i
have 3 H2's and some paragraphs after them it will surround all HTML
after each of the H2 in a div.
So my HTML would look like this...
<h2>some dummy text</h2>
Some Content
<h2>some dummy text</h2>
Some Content
<h2>some dummy text</h2>
Some Content
And i want it to do this...
<h2>some dummy text</h2>
<div class="someclass">Some Content
</div>
<h2>some dummy text</h2>
<div class="someclass">Some Content
</div>
<h2>some dummy text</h2>
<div class="someclass">Some Content
</div>
Anyone know how to do this and can help me?
I am just starting with jquery so any examples would be soooo
appreciated and you would be my hero! :)
Thanks in advance!!!!