File tree Expand file tree Collapse file tree 2 files changed +0
-34
lines changed Expand file tree Collapse file tree 2 files changed +0
-34
lines changed Original file line number Diff line number Diff line change 1
1
var tocData ;
2
- var treeOutput = new Array ( ) ;
3
- function renderTree ( tree )
4
- {
5
- for ( var i = 0 ; i < tree . length ; i ++ )
6
- {
7
- if ( tree [ i ] . heading )
8
- {
9
- // render a heading
10
- } else {
11
- if ( tree [ i ] . sectiontitle ) {
12
- treeOutput . push ( '<li class="leaf menu-closed"><a href="#" class="expand-menu "><span class="menu-icon" aria-hidden="true"></span>' + tree [ i ] . sectiontitle + '</a>' ) ;
13
- treeOutput . push ( '<ul class="nav-sub">' ) ;
14
- renderTree ( tree [ i ] . section ) ;
15
- treeOutput . push ( '</ul>' ) ;
16
- } else {
17
- treeOutput . push ( '<li class="leaf"><a href="' + tree [ i ] . path + '" class="' ) ;
18
- if ( tree [ i ] . path == window . location . pathname ) treeOutput . push ( 'active currentPage' ) ;
19
- treeOutput . push ( '">' + tree [ i ] . title + '</a></li>' ) ;
20
- }
21
- }
22
- }
23
- }
24
2
function hookupTOCEvents ( )
25
3
{
26
4
// do after tree render
@@ -41,14 +19,6 @@ function hookupTOCEvents()
41
19
} ) ;
42
20
}
43
21
jQuery ( document ) . ready ( function ( ) {
44
- /*
45
- $.getJSON( "/toc.txt", function( data ) {
46
- tocData = data;
47
- renderTree(data.toc);
48
- $(".nav-sub").html(treeOutput.join(''));
49
- hookupTOCEvents();
50
- });
51
- */
52
22
hookupTOCEvents ( ) ;
53
23
$ ( "#TableOfContents ul" ) . empty ( ) ;
54
24
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments