Created
February 3, 2017 11:36
-
-
Save Belrestro/3f5867208e87af7f5a9d6d637f272d4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$("a[href^='#']:not([data-toggle='tab']").click(function() { | |
var anchor = $(this).attr("href"); | |
if ($(anchor).length != 0) { | |
$("html, body").animate({scrollTop: $(anchor).offset().top - ($('header').height()+10)}, 500); | |
} | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment