X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..aa24f78a82a1d76003a964fefc69e5a5bf96a746:/src/wolnelektury/static/js/book_text/toc.js?ds=inline diff --git a/src/wolnelektury/static/js/book_text/toc.js b/src/wolnelektury/static/js/book_text/toc.js index 31f4e9ffc..d03bbb9bd 100644 --- a/src/wolnelektury/static/js/book_text/toc.js +++ b/src/wolnelektury/static/js/book_text/toc.js @@ -1,9 +1,17 @@ (function($){$(function(){ + if ($("#toc a").length > 0) { + $("#toc > ol").appendTo($("#heretoc")); + } -if ($('#toc li').length > 0) { - $('#menu-toc').show(); -} + if ($('#wltoc li').length > 0) { + $('#menu-toc').show(); + } + if ($('#wltoc li a').length == 0) { + $('#menu li a[href="#wltoc"]').remove(); + } + + $("#toc").remove(); })})(jQuery);