When I use the html tag to define a base URL for all relative links on a page, anchor links also refer directly to the base URL. Is there a way to
Here's an even shorter, jQuery based version I use in a production environment, and it works well for me.
$().ready(function() { $("a[href^='\#']").each(function(){ this.href=location.href.split("#")[0]+'#'+this.href.substr(this.href.indexOf('#')+1); }); });