I have a pdf link with the filesize as follows…
<a class="pdf-link" href="some-pdf.pdf">Some PDF</a> <span class="filesize">(PDF 100kb)</span>
The link is generated by our CMS and for our mobile site the span needs to sit within the link.
Would anyone know of a way to move the closing </a> tag to the end of the span, preferably with jQuery?
<a class="pdf-link" href="some-pdf.pdf">Some PDF <span class="filesize">(PDF 100kb)</span></a>
Any help would be much appreciated.
Try:
You don’t need to manually remove the content, as
appendTomoves your DOM internally, from the docs: