TableOfContents

Table of contents
No headers
/***
    USAGE:

    TableOfContents()
        Show a table of contents for the sections in an article
***/

// Redirect to custom page, if any
var template_custom = wiki.inclusions(true)[-1].path .. 'Custom';
if (wiki.pageexists(template_custom)) {
    return template(template_custom, $);
}

<div class="idf-toc">
page.toc
</div>
.idf-toc div.wiki-toc {
  float: right;
  background: #fff;
  border: 1px solid #ccc;
  padding: 0px 0px 10px 10px;
  width: 225px;
}
// replace existing toc with new
$(function(){ 
    $('#pagetoc').remove();
    $('.idf-toc').attr('id', 'pagetoc');
})
Page statistics
21 view(s), 1 edit(s) and 696 character(s)

Tags

This page has no custom tags set.

Comments

You must to post a comment.

Attach file

Attachments