Reformat slightly; hide the table of contents if there are less than two
jump marks.
This commit is contained in:
parent
23d2bd552c
commit
29d966cdb3
@ -1,7 +1,11 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(":header", "#wiki-content").map(function (index) {
|
$(":header", "#wiki-content").map(function(index) {
|
||||||
this.id = "wikititle_" + index;
|
this.id = "wikititle_" + index;
|
||||||
$("<a href='#" + this.id + "'>" + jQuery.fn.text([this]) + "</a>").addClass("wiki-" + this.tagName.toLowerCase()).appendTo('#wiki-toc-content');
|
$("<a href='#" + this.id + "'>" + jQuery.fn.text([this]) + "</a>")
|
||||||
|
.addClass("wiki-" + this.tagName.toLowerCase())
|
||||||
|
.appendTo('#wiki-toc-content');
|
||||||
});
|
});
|
||||||
|
if ($('#wiki-toc-content').size() < 2)
|
||||||
|
$('#wiki-toc').hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user