virt2/api/jquery/plugins/owl.carousel/OwlCarousel2-2.3.4/docs/assets/js/app.js

32 lines
646 B
JavaScript
Raw Permalink Normal View History

$(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();