Add a span tag to text inside a hyperlink, using jQuery
<p>How would you add a span tag to the text inside a hyperlink?</p>

<p>Right now, I'm changing the existing text to something else, using this:</p>

<pre><code>$(document).ready(function() {
$("a:contains('text')").text('new-text')
});
</code></pre>

<p>I need the link to look like this when it is parsed:</p>

<pre><code>&lt;a href="/xxx.aspx"&gt;new-text&lt;span class="someclass"&gt;some other text&lt;/span&gt;&lt;/a&gt;
</code></pre>

<p>So I need to add that span tag inside the </p>

<p>Any ideas?</p>
