Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

wrapping a span tag with an a tag with a href target same as the text of the span

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<span class='myClass'>aaa</span>
<span class='myClass'>bbb</span>
<span class='myClass'>ccc</span>
<span class='myClass'>ddd</span>
 
PREVIOUS NEXT
Tagged: #wrapping #span #tag #tag #href #target #text #span
ADD COMMENT
Topic
Name
2+4 =