Skip to content

Commit

Permalink
check for nav-tabs and don't try and scroll on them.
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-singer committed Nov 6, 2013
1 parent 4737dcd commit 4174576
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/site/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ $(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
var isnavtabs = $('.nav-tabs')[0];
if (target.length && !isnavtabs) {
var scrollOffset = $('.navbar').outerHeight() + scrollPadding;
$('html,body').animate({
scrollTop: target.offset().top - scrollOffset
Expand Down

0 comments on commit 4174576

Please sign in to comment.