indefero/www/media/idf/js/wiki-toc.js
2011-01-25 09:57:44 +01:00

8 lines
298 B
JavaScript

$(document).ready(function() {
$(":header", "#wiki-content").map(function (index) {
this.id = "wikititle_" + index;
$("<a href='#" + this.id + "'>" + jQuery.fn.text([this]) + "</a>").addClass("wiki-" + this.tagName.toLowerCase()).appendTo('#wiki-toc-content');
});
});