toc = {}; // Generate the table of contents in the side nav menu (see view/tpl/help.tpl) $(document).ready(function () { // Generate the table of contents in the side nav menu (see view/tpl/help.tpl) $('#doco-top-toc').toc({content: "#doco-content", headings: "h3,h4,h5,h6"}); $(".doco-section").find('a').each(function () { var url = document.createElement('a'); url.href = window.location; 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').after('