$(function(){
$('a').each(function(){
var x=this.href;
this.href="www.somesitename.com/filter"+this.href;
});
});
i wrote the above jQuery script to append some site name to all the links in the page but it’s not working as expected.
I wonder why would you use jQuery for such basic behaviour…
that is why the tag BASE is there for
don’t complicate what is simple!
added
from Sitepoint