|
147 | 147 | $('.social-menu').css({'margin-top': 309}) |
148 | 148 | } |
149 | 149 |
|
150 | | - //Check URL |
151 | | - // var path = window.location.pathname; |
152 | | - // var pathName = path.split('/'); |
153 | | - // var num = pathName.length - 2; |
| 150 | + //Remove <ul> from Releases |
| 151 | + $('.toctree-l1 > a').each(function(){ |
| 152 | + if($(this).html() == "Releases") { |
| 153 | + console.log($(this).html()); |
| 154 | + } |
| 155 | + }); |
154 | 156 |
|
| 157 | + //Check URL |
155 | 158 | var path = window.location.href; |
156 | 159 | var pathName = path.split('/'); |
157 | 160 | var num = pathName.length - 3; |
158 | | - console.log(pathName[num]); |
159 | 161 | var gettingstarted, terms, client, server, contributing; |
160 | 162 |
|
161 | 163 | switch(pathName[num]) { |
162 | 164 | case 'gettingstarted': |
163 | | - console.log('case at Getting Started'); |
| 165 | + //case at Getting Started |
164 | 166 | $('.toctree-l1 > a').each(function(){ |
165 | 167 | if($(this).html() == "Getting Started") { |
166 | 168 | $(this).parent().attr('state', 'open'); |
|
169 | 171 | }); |
170 | 172 | break; |
171 | 173 | case 'terms': |
172 | | - console.log('case at Terms'); |
| 174 | + //case at Terms |
173 | 175 | $('.toctree-l1 > a').each(function(){ |
174 | 176 | if($(this).html() == "Terms") { |
175 | 177 | $(this).parent().attr('state', 'open'); |
|
178 | 180 | }); |
179 | 181 | break; |
180 | 182 | case 'client': |
181 | | - console.log('case at Client Reference'); |
| 183 | + //case at Client Reference |
182 | 184 | $('.toctree-l1 > a').each(function(){ |
183 | 185 | if($(this).html() == "Client Reference") { |
184 | 186 | $(this).parent().attr('state', 'open'); |
|
187 | 189 | }); |
188 | 190 | break; |
189 | 191 | case 'server': |
190 | | - console.log('case at Server Reference'); |
| 192 | + //case at Server Reference |
191 | 193 | $('.toctree-l1 > a').each(function(){ |
192 | 194 | if($(this).html() == "Server Reference") { |
193 | 195 | $(this).parent().attr('state', 'open'); |
|
196 | 198 | }); |
197 | 199 | break; |
198 | 200 | case 'contributing': |
199 | | - console.log('case at Contributing'); |
| 201 | + //case at Contributing |
200 | 202 | $('.toctree-l1 > a').each(function(){ |
201 | 203 | if($(this).html() == "Contributing") { |
202 | 204 | $(this).parent().attr('state', 'open'); |
|
208 | 210 | //code this out when releases gets filled out |
209 | 211 | break; |
210 | 212 | default: |
211 | | - console.log('failure.'); |
212 | 213 |
|
213 | 214 | } |
214 | 215 |
|
215 | | - |
216 | | - // switch(pathName[num]) { |
217 | | - // case gettingstarted: |
218 | | - // $('Getting Started').parent().attr('state', 'open'); |
219 | | - // $('Getting Started').attr('state', 'open'); |
220 | | - // break; |
221 | | - // } |
222 | | - |
223 | | - //Check for match between path name and menu titles |
224 | | - //$('.toctree-l2 > a').each(function(){ |
225 | | - // if($(this).html().toLowerCase() == pathName[num]) { |
226 | | - // var parents = $(this).parents(); |
227 | | - // $(parents[2]).attr('state', 'open'); |
228 | | - // } |
229 | | - //}); |
230 | | - |
231 | 216 | //Doc Sidebar: Create accordion |
232 | 217 | var allPanels = $('.toctree-l1 > ul'); |
233 | 218 | allPanels.hide(); |
|
0 commit comments