For some reason the following code doesn't work in Safari

I am not sure why this works in Chrome but won't work in safari and Firefox.

$("a.settings").attr("href", function(i, href) {
        return href + '#tab-navigation';
        });