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){ | ||
− | console.log(evnt.target, evnt.target. | + | console.log(evnt.target, $(evnt.target).offset().top) |
− | scrollTo(0, evnt.target. | + | scrollTo(0, $(evnt.target).offset().top - 20); |
evnt.preventDefault(); | evnt.preventDefault(); | ||
} | } |
Revision as of 15:01, 16 August 2015