1
I’m with a system that seeks product suggestions via ajax. He pulls the information, but this information comes from an external site, and he has the local URL.
href="/produto/123
, need to get it inserted in allhref=""
, the domain of the site. Ex:href="http:/meusite.com/produto/123
. For a better explanation, I need all thehref=""
contained within:
<div class="recommendation-shelf"></div>
Be aggregated http://meusite.com
inside href="<urldomeusite>/produto/123"
being like this:
href="http://meusite.com/producto/123"
Note: If possible, in Pure Javascript...
I want something simple, using Javascript Pure.
– Alexandre Lopes
I can assure you that the simplest way is to use Jquery rather than pure javascript. There was an error in my script and I’ve updated it
– Breno Perucchi
@Brenoperucchi I respect your opinion but I deeply disagree that the simplest way is to use jQuery, that is, it is your right to have your opinion, but it is only an opinion. I just want to make it clear to anyone who reads here that doesn’t think this is an absolute truth.
– Maniero
@bigown to my reality is rather more complicated pure javascript than jquery. I understand the difference of opinion, but each has its own. I don’t want to argue because I really understand what you meant. I will effect a change in the comment if I could.
– Breno Perucchi