Add table of contents on wiki pages
This commit is contained in:
7
www/media/idf/js/wiki-toc.js
Normal file
7
www/media/idf/js/wiki-toc.js
Normal 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');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user