I would like to know if there is any function in jQuery that can concatenate to the page's hrefs a string.
My page behaves differently if my url contains #es
or #pr
, so I wanted to keep this comment at the end of each link.
Example:
<a href="/pagina/">Página</a>
would become if the #pr
comment is in the url
<a href="/pagina/#pr">Página</a>
But I wanted to do this with all the links on the page.
A function that captures all href
's and that can put them after treated in proper places would also work.