File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -283,9 +283,12 @@ footer.pretty-box {
283
283
footer .pretty-box p {
284
284
margin : 3px 0 ; }
285
285
286
- # TOC_title {
287
- font-size : 120% ; }
288
- # TOC_title a {
286
+ # TOC_Title {
287
+ font-size : 120% ;
288
+ white-space : nowrap;
289
+ }
290
+
291
+ # TOC_Title a {
289
292
font-weight : normal;
290
293
font-size : 90% ;
291
294
outline : 0 ;
@@ -327,7 +330,6 @@ table#TOC tr.toc-level-1 td.toc-text {
327
330
left : 0pt ;
328
331
}
329
332
330
-
331
333
table # TOC code {
332
334
color : blue;
333
335
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function setup_auto_title_anchors() {
30
30
31
31
function setup_collapsible_TOC ( ) {
32
32
var state ;
33
- if ( ! $ ( 'nav.indexgroup > ol' ) . length ) { return ; }
33
+ if ( ! $ ( 'nav.indexgroup' ) ) { return ; }
34
34
35
35
// fix for jumpy .slideDown() effect
36
36
$ ( 'nav.indexgroup > ol' ) . each ( function ( ) {
@@ -42,23 +42,23 @@ function setup_collapsible_TOC() {
42
42
$ ( 'nav.indexgroup > ol' ) . hide ( ) ;
43
43
}
44
44
45
- $ ( 'nav.indexgroup' )
46
- . prepend ( '<h2 id="TOC_title">Table of Contents'
47
- + ' <a href="#">['
45
+ $ ( 'nav.indexgroup' ) . find ( '#TOC_Title' )
46
+ . append (
47
+ '<a id="TOC_toggle_button" href="#">['
48
48
+ ( state == 'hidden' ? 'show' : 'hide' )
49
49
+ ']</a></h2>'
50
50
)
51
- . find ( '> h2 > a ' )
51
+ . find ( '#TOC_toggle_button ' )
52
52
. click ( function ( ) {
53
53
var el = $ ( this ) ;
54
54
if ( el . text ( ) == '[hide]' ) {
55
55
Cookies . set ( 'toc_state' , 'hidden' ) ;
56
- el . parents ( 'nav' ) . find ( 'ol ' ) . slideUp ( ) ;
56
+ el . parents ( 'nav' ) . find ( 'tbody ' ) . slideUp ( ) ;
57
57
el . text ( '[show]' ) ;
58
58
}
59
59
else {
60
60
Cookies . set ( 'toc_state' , 'shown' ) ;
61
- el . parents ( 'nav' ) . find ( 'ol ' ) . slideDown ( ) ;
61
+ el . parents ( 'nav' ) . find ( 'tbody ' ) . slideDown ( ) ;
62
62
el . text ( '[hide]' ) ;
63
63
}
64
64
You can’t perform that action at this time.
0 commit comments