Is it possible to do the following with jQuery so that this:
<h2>
This is a test
<span>i</span>
mag
<span>i</span>
nat
<span>i</span>
on
</h2>
Becomes this:
<h2>
This is a test
<span class="wrap">
<span>i</span>
mag
<span>i</span>
nat
<span>i</span>
on
</span>
</h2>
So I want the outer span to wrap all the inner spans.
Don't feel this is a duplicate question as I want to just wrap the all the spans and not the text "This is a test".