How to add span tag within anchor, changing it from
<a href="somewhere.html">Here is the link to somewhere.</a>
to this with jquery
<a href="somewhere.html">
<span>Here is the span content.</span>
Here is the link to somewhere.
</a>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
This will add a span tag to the start of each and every
aelement on the page. If you want to restrict the modifying to some specific elements, add a class to them and call them with something like$('a.myclass').each(...