1(function ($) { 2 'use strict'; 3 4 /* Canvas open */ 5 $('.canvas_open').on('click', function () { 6 $('.offcanvas_menu_wrapper,.off_canvars_overlay').addClass('active'); 7 }); 8 9 $('.canvas_close,.off_canvars_overlay').on('click', function () { 10 $('.offcanvas_menu_wrapper,.off_canvars_overlay').removeClass('active'); 11 }); 12 13 /* Offcanvas menu */ 14 var $offcanvasNav = $('.offcanvas_main_menu'); 15 16 // hide all sub menus initially 17 $offcanvasNav.find('.sub-menu').hide(); 18 19 // add expand icon 20 $offcanvasNav.find('li').has('.sub-menu') 21 .prepend('<span class="menu-expand"><i class="icofont-rounded-down"></i></span>'); 22 23 // click event 24 $offcanvasNav.on('click', '.menu-expand, li > a[href="#"]', function (e) { 25 e.preventDefault(); 26 27 var $parent = $(this).parent('li'); 28 var $submenu = $parent.children('.sub-menu'); 29 30 // close other submenus 31 $parent.siblings().removeClass('menu-open').children('.sub-menu').slideUp(); 32 33 // toggle current submenu 34 $parent.toggleClass('menu-open'); 35 $submenu.slideToggle(); 36 }); 37 38})(jQuery);
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.