diff --git a/javascript/TabSet.js b/javascript/TabSet.js index fad57a8cf..d9bcb54b9 100644 --- a/javascript/TabSet.js +++ b/javascript/TabSet.js @@ -26,8 +26,8 @@ */ rewriteHashlinks: function() { $(this).find('ul a').each(function() { - var href = $(this).attr('href').replace(/.*(#.*)/, '$1'); - if(href) $(this).attr('href', href); + var href = $(this).attr('href'); + if(href) $(this).attr('href', href.replace(/.*(#.*)/, '$1')); }); } });