Difference between revisions of "Template:SJTU-BioX-Shanghai/Alpha/Header"
Line 11: | Line 11: | ||
var ele = $("#" + evnt.target.parentElement.href); | var ele = $("#" + evnt.target.parentElement.href); | ||
console.log(ele, ele.offset().top); | console.log(ele, ele.offset().top); | ||
− | scrollTo(0, ele.offset().top | + | scrollTo(0, ele.offset().top-40); |
evnt.preventDefault(); | evnt.preventDefault(); | ||
} | } |
Revision as of 15:09, 16 August 2015