Permalink
Browse files

BUGFIX: cater for elements without href

  • Loading branch information...
mateusz committed May 23, 2012
1 parent 29e04a1 commit bbb08df1760b265f7ead63f0af9badf488aa6c72
Showing with 2 additions and 2 deletions.
  1. +2 −2 javascript/TabSet.js
View
@@ -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'));
});
}
});

0 comments on commit bbb08df

Please sign in to comment.