When I write a blog post on my WordPress site, I want do dynamically add a span-tag inside all the anchor tags, with a data-attribute that has the same value as the anchor tag.
Example
What I write in WordPress:
<p>Some text with <a href="#">a link in it</a></p>
What generates:
<p>Some text with <a href="#"><span data-title="a link in it">a link in it</span></a>
How can you do this with jQuery or PHP?
jQuery and wrapInner() works also:
http://jsfiddle.net/242b8/