Add table of contents on wiki pages

This commit is contained in:
William MARTIN
2011-01-07 22:33:18 +01:00
parent 146e956432
commit 93af6a68bd
3 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
$(document).ready(function() {
$(":header", "#wiki-content").map(function (index) {
this.id = "wikititle_" + index;
$("<a href='#" + this.id + "'>" + this.innerText + "</a>").addClass("wiki-" + this.tagName.toLowerCase()).appendTo('#wiki-toc-content');
});
});