tags:

views:

55

answers:

1

I am aware that I can access all external links on a page using something like:

// Get external links
$.expr[':'].external = function(obj){
return !obj.href.match(/^mailto\:/)
        && (obj.hostname != location.hostname);
};

does anyone know how I can add a query string pair (along the lines of ?aid=1234567) to the URLs in the external links?

Thanks in advance

+2  A: 
mgroves
Thanks for the prompt reply. Didn't work at first until I put it in the $(document).ready() function, and now it works a treat.Many thanks
Dave
Sorry, I guess I just made the assumption that you knew to put it there, but thank you for accepting.
mgroves
my fault - should have said that I was new to jqueryThanks again
Dave