I have a several links whose text content I'd like to replace with a automatically generated image based on the text content.
So currently it looks like this:
<a href="blabla" class="mLink">
<span class="mText">The Text in Question</span>
</a>
and I would like to have either
<a href="blabla" class="mLink">
<img src="/ImageTextHandler.ashx?message=The+Text+in+Question" alt="The Text in Question"/>
</a>
or
<a href="blabla" class="mLink">
<span class="mText">
<img src="/ImageTextHandler.ashx?message=The+Text+in+Question" alt="The Text in Question"/>
</span>
</a>
How do I access the element in question inside a .replaceWith or .html so that I can get the text content?