Well that,
I have a list <li>
with elements that are created dynamically, they always have this structure:
<li>TEXTO: url</li>
Where TEXTO:
it never changes, it's always the same word, and it URL
can vary.
I had thought with JS, find the string TEXTO:
and replace it with<a href="
var i = "TU SITIO:".replace('TU SITIO:','<a href="');
<li>TU SITIO: https://example.com/100</li>
<li>TU SITIO: https://example.com/index.html/otros</li>
<li>TU SITIO: https://example.com/cambio.php</li>
I don't know if it's the right thing to do, or if there is a more comfortable method, I don't currently use jQuery, but I could implement it. If you need me to correct something, I will gladly be attentive to your comments.
This would be a way to do it with jQuery
I hope it helps you!
I share a solution: