File tree Expand file tree Collapse file tree 1 file changed +31
-17
lines changed Expand file tree Collapse file tree 1 file changed +31
-17
lines changed Original file line number Diff line number Diff line change 51
51
} ;
52
52
</ script >
53
53
54
+
55
+ < script >
56
+ function myFunction ( ) {
57
+ var x = document . getElementById ( "myLinks" ) ;
58
+ // Toggle the display between block and none
59
+ if ( x . style . display === "block" ) {
60
+ x . style . display = "none" ;
61
+ } else {
62
+ x . style . display = "block" ;
63
+ }
64
+ }
65
+
66
+ // Optional: Remove reverseLinks function if not needed
67
+ function reverseLinks ( ) {
68
+ var container = document . getElementById ( "myLinks" ) ;
69
+ var links = Array . from ( container . getElementsByTagName ( 'a' ) ) ;
70
+ container . innerHTML = '' ;
71
+ // Appending links in reverse order (if necessary)
72
+ for ( var i = links . length - 1 ; i >= 0 ; i -- ) {
73
+ container . appendChild ( links [ i ] ) ;
74
+ }
75
+ }
76
+ </ script >
54
77
</ head >
55
78
56
79
< body >
57
80
58
81
<!-- Navigation Bar -->
59
- < div class ="topnav " id ="myTopnav ">
60
- < a href ="javascript:void(0); " class ="icon " onclick ="toggleNav() ">
61
- < i class ="fa fa-bars "> </ i >
62
- </ a >
82
+ < div class ="topnav ">
83
+
63
84
< div id ="myLinks ">
64
- {% include navigation.md %}
85
+ {% include navigation.md %}
65
86
</ div >
66
- </ div >
67
87
68
- < script >
69
- function toggleNav ( ) {
70
- var x = document . getElementById ( "myLinks" ) ;
71
- if ( x . style . display === "block" ) {
72
- x . style . display = "none" ;
73
- } else {
74
- x . style . display = "block" ;
75
- }
76
- }
77
- </ script >
78
-
88
+ < a href ="javascript:void(0); " class ="icon " onclick ="myFunction();reverseLinks() ">
89
+ < i class ="fa fa-bars "> </ i >
90
+ </ a >
91
+
92
+ </ div >
79
93
80
94
<!-- Main Content -->
81
95
< div class ="wrapper ">
You can’t perform that action at this time.
0 commit comments