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.parentElement) | ||
+ | console.log(evnt.target.parentElement.attributes["href"]) | ||
+ | console.log(evnt.target.parentElement.attributes["href"].nodeValue) | ||
var ele = $("#" + evnt.target.parentElement.attributes["href"].nodeValue) | var ele = $("#" + evnt.target.parentElement.attributes["href"].nodeValue) | ||
console.log(ele, ele.offset().top); | console.log(ele, ele.offset().top); |
Revision as of 15:17, 16 August 2015