Difference between revisions of "Template:SJTU-BioX-Shanghai/Alpha/Header"
Line 7: | Line 7: | ||
} | } | ||
function init() { | function init() { | ||
− | $('#toc ul a').click(function(){ | + | $('#toc ul a').click( |
+ | function(evnt){ | ||
+ | scrollTo(0, evnt.target.offsetTop-20); | ||
+ | evnt.preventDefault(); | ||
+ | } | ||
+ | ) | ||
} | } | ||
Revision as of 14:56, 16 August 2015