I would like to append a query string onto all dynamic links within a page - to fix a bug in a old release - is this possible?
Any ideas?
Something like this?
var querystring = 'myquerystringtoadd'; $('a').each(function() { var href = $(this).attr('href'); if (href) { href += (href.match(/\?/) ? '&' : '?') + querystring; $(this).attr('href', href); } });
Working example.