You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
646 B
32 lines
646 B
$(document).ready(function(){ |
|
|
|
// responsive nav |
|
var responsiveNav = $('#toggle-nav'); |
|
var navBar = $('.nav-bar'); |
|
|
|
responsiveNav.on('click',function(e){ |
|
e.preventDefault(); |
|
console.log(navBar); |
|
navBar.toggleClass('active') |
|
}); |
|
|
|
// pseudo active |
|
if($('#docs').length){ |
|
var sidenav = $('ul.side-nav').find('a'); |
|
var url = window.location.pathname.split( '/' ); |
|
var url = url[url.length-1]; |
|
|
|
sidenav.each(function(i,e){ |
|
var active = $(e).attr('href'); |
|
|
|
if(active === url){ |
|
$(e).parent('li').addClass('active'); |
|
return false; |
|
} |
|
}); |
|
} |
|
|
|
}); |
|
|
|
hljs.configure({tabReplace: ' '}); |
|
hljs.initHighlightingOnLoad(); |