1jQuery(document).ready(function($) { 2 3 // tell CSS we're using JavaScript 4 $('body').addClass('js'); 5 6 // declare variables 7 var $menu = $('#menu'), 8 $menulink = $('.menu-link'), 9 $menuTrigger = $('.has-subnav > a'); 10 11 // handle main menu toggle 12 $menulink.click(function(e) { 13 e.preventDefault(); 14 $menulink.toggleClass('active'); 15 $menu.toggleClass('active'); 16 }); 17 18 // handle sub-menu toggle 19 $menuTrigger.click(function(e) { 20 e.preventDefault(); 21 var $this = $(this); 22 $this.toggleClass('active').next('ul').toggleClass('active'); 23 }); 24 25 // handle accordion groups 26 $(".accordion .content").slideUp(0); 27 $(".accordion .active .content").slideDown(0); 28 $(".accordion .header a").unbind("click").click(function(e){ 29 e.preventDefault(); 30 var $accordion = $(this).closest(".accordion"); 31 var $activepanel = $(this).closest(".panel"); 32 if (!$($activepanel).hasClass("active")) { 33 $(".panel", $accordion).removeClass("active"); 34 $($activepanel).addClass("active"); 35 $(".content", $accordion).not(".active").slideUp(250); 36 $(".panel.active .content", $accordion).slideDown(250); 37 console.log('closing and opening'); 38 } else { 39 $(".panel", $accordion).removeClass("active"); 40 $(".content", $accordion).slideUp(250); 41 console.log('closing, no opening'); 42 } 43 }) 44 45});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.