Difference between revisions of "Template:BNU-CHINA/article"
Line 75: | Line 75: | ||
} | } | ||
}); | }); | ||
− | $("a[href^=#]").on("click", function( | + | $("a[href^=#]").on("click", function() { |
− | var $target = $( | + | var $target = $(this.href); |
$("html, body").animate({scrollTop: $target.offset().top - $(".sub-header").height()}, "slow"); | $("html, body").animate({scrollTop: $target.offset().top - $(".sub-header").height()}, "slow"); | ||
}); | }); |
Revision as of 00:45, 19 September 2015