X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..807d88a6bbd34865987b59a757e7b4ef3b3fc718:/src/wolnelektury/static/js/book_text/toc.js?ds=sidebyside 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);