Copying the contents of an H2 tag on a page to a series of spans inside a div

Posted by mmsa on Stack Overflow See other posts from Stack Overflow or by mmsa
Published on 2010-06-10T13:05:50Z Indexed on 2010/06/10 13:12 UTC
Read the original article Hit count: 185

Filed under:

I have an H1 tag on a page with an ID of "Topic Name

<h1 id="topicName"><a href="/link here">News You Can Use</a></h1>

I need to copy the text inside the H1 and apply it to a series of span tags which are inside a div.

<div class="post"> <h2>{tag_postdate} <span class="topicName2"> </span></h2></div>

I need to get "News you can Use" and copy it inside each instance of .topicName2

Any help would be appreciated!

© Stack Overflow or respective owner

Related posts about jQuery