Hello everyone, I just started using jquery and I'm having some
difficulty figuring out how to do two things.

First, how do I get this:
<b>Hello</b>
To become this?
<span><b>Hello</b></span>
I know how to do $("b").before("span"), but $("/b").after("span") is
not working.

Second, how do I get this:
<span>Hello</span>
<span>Hello</span>
To become this?
<span id="1">Hello</span>
<span id="2">Hello</span>
I tried using a counter and replaceWith(), but this method returns a
DOM not an jquery element so .attr(counter) wont work.

Reply via email to