Honestly, it might be easier to just overload the links onclick events, instead of worrying about doing the appendation to everything.
$("#content_main a").click(function(){ window.location = 'cms/' + $(this).attr('href'); }); On Dec 11, 9:11 am, Kris <[EMAIL PROTECTED]> wrote: > Okay the only issue I'm facing now and its not strictly a JQuery one, > its more an IE one... > > HREF's like 'images/trucks.jpg' should be prefixed with 'cms/' giving > 'cms/images/trucks.jpg'. > > Firefox and Safari are okay, I get URLs like: > > http://www.mydomain.com/inprog/cvs/cms/images/trucks.jpg > > But in IE it adds the entire URL twice... > > http://www.mydomain.com/inprog/cvs/cms/http://www.mydomain.com/inprog... > > Why would this be, I'm guessing IE is returning the entire URL for > href, not just what is present in the attribute? Any way around this? > > var path_prefix = 'cms/'; > $("#content_main a:not(.external)").attr('href', function() { > return path_prefix + $(this).attr('href'); > > });