1 2(function ($, Drupal, window, document, undefined) { 3 Drupal.behaviors.navbarMobile = { 4 attach: function(context, settings) { 5 6 $(document).ready(function(){ 7 // Add a class to body if is shown or hidden, to adjust css on mobile 8 $(".primary-navbar-collapse").on('show.bs.collapse',function() { 9 $("body").addClass("menu-open"); 10 }).on('hide.bs.collapse',function() { 11 $("body").removeClass("menu-open"); 12 }); 13 // /Add a class to body if is shown or hidden, to adjust css on mobile 14 15 // Add a "back" button on submenus (for mobile) 16 $('.tb-megamenu .mega-dropdown-menu:last-child').append('<button class="mega-dropdown-menu-back">'+Drupal.t('Voltar')+'</button>'); 17 18 // /Add a "back" button on submenus (for mobile) 19 20 // Open menu on mobile 21 if($(window).width() < 768){ 22 $('.tb-megamenu-nav > li.tb-megamenu-item.dropdown > a').click(function(event) { 23 $megamenu_item = $(this).parent(); 24 $megamenu_item.addClass('open'); 25 }); 26 $('.tb-megamenu-nav .mega-dropdown-menu-back').click(function(event) { 27 $megamenu_item = $(this).parent().parent('li.tb-megamenu-item.dropdown'); 28 $megamenu_item.removeClass('open'); 29 }); 30 31 $level = $(".primary-navbar-collapse .tb-megamenu-nav.level-0 > :not(li.level-1.icon)").find(".mega-dropdown-menu"); 32 $level.each(function(){ 33 $(this).parent().find(' > a').append('<span class="menu-ico-collapse"><i class="fa fa-plus-circle"></i></span>'); 34 }); 35 36 $(".menu-ico-collapse").on("click", function(e) { 37 e.preventDefault(); 38 }); 39 } 40 }); 41 } 42 }; 43})(jQuery, Drupal, this, this.document);
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.