Difference between revisions of "Template:BNU-CHINA/article"
Line 15: | Line 15: | ||
<script> | <script> | ||
$(document).ready(function () { | $(document).ready(function () { | ||
+ | var baseline = $("#top_menu_14").height(); | ||
var scrollToHash = function(hash) { | var scrollToHash = function(hash) { | ||
if (hash.indexOf("#") == 0) { | if (hash.indexOf("#") == 0) { | ||
Line 20: | Line 21: | ||
$("html, body").animate({scrollTop: $target.offset().top - $(".sub-header").height()}, "slow"); | $("html, body").animate({scrollTop: $target.offset().top - $(".sub-header").height()}, "slow"); | ||
} | } | ||
− | } | + | }; |
scrollToHash(window.location.hash); | scrollToHash(window.location.hash); |
Revision as of 01:18, 19 September 2015