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