jQuery: Insert html from "title" tag into a "span" of a H2 tag

Posted by lorenzium on Stack Overflow See other posts from Stack Overflow or by lorenzium
Published on 2010-03-14T09:35:55Z Indexed on 2010/03/14 9:45 UTC
Read the original article Hit count: 481

Filed under:
|
|
|
|

Hey guys, Say I had the following HTML:

<h2>Heading <span></span></h2>

<ul>
<li><a href="#" title="I am wanting to be in H2!">Something</a></li>
<li><a href="#" title="I too am wanting to be in H2!">Something else</a></li>
</ul>

I want to be able to take the title tag from the and place it inside the span of the h2. How can I do so?

Cheers.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about insert