Proposed fix for issue #1091

This commit is contained in:
Galette Saucisse 2018-04-20 19:17:52 +02:00 committed by GitHub
parent 92b08f1f07
commit ba8f8c3403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ $(document).ready(function () {
var pageName = url.href.split('/').pop().split('#').shift().split('?').shift();
var linkName = $(this).attr('href').split('/').pop();
if (pageName === linkName) {
var tocUl = $(this).closest('a').append('<ul>').find('ul');
var tocUl = $(this).closest('a').after('<ul>').next('ul');
tocUl.removeClass(); // Classes are automatically added to <ul> elements by something else
tocUl.toc({content: "#doco-content", headings: "h3"});
tocUl.addClass('toc-content');