aboutsummaryrefslogtreecommitdiff
path: root/Documentation/build/_static/apitoc.js
blob: 3220bd149ef8d7c33f4567920ba63f618659cb29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Inject API members into the TOC in the sidebar.
// This should be loaded in the localtoc.html template.

$(function (){
    $('div.section').each(function(index) {
        var $section = $(this),
            $tocitem = $('.sphinxlocaltoc li:has(> a.reference.internal[href="#' + 
                         $section.attr('id') +
                         '"])');
            $members = $('<ul>').appendTo($tocitem);
        $('> dl > dt', $section).each(function(index) {
            var $member = $(this),
                $tocMember = $('<li class="api-member">');
            $tocMember.text($('.property', $member).text() + ' ');
            $tocMember.append('<a href="#' + $member.attr('id') + '">' + 
                              $('.descname', $member).text() + 
                              '</a>');
            $members.append($tocMember);
        });
    });
});