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/cvs/images/trucks.jpg

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');
});

Reply via email to