Difference between revisions of "Template:SJTU-BioX-Shanghai/Alpha/Header"
Line 7: | Line 7: | ||
} | } | ||
function init() { | function init() { | ||
− | $('#toc div#toctitle + ul a | + | $('#toc div#toctitle + ul a').click( |
function(evnt){ | function(evnt){ | ||
evnt.preventDefault(); | evnt.preventDefault(); | ||
− | var a = evnt.target | + | var a = evnt.target; |
var id = a.attributes["href"].nodeValue; | var id = a.attributes["href"].nodeValue; | ||
var ele = document.getElementById(id.slice(1, id.length)) | var ele = document.getElementById(id.slice(1, id.length)) |
Revision as of 01:45, 17 August 2015