1(function ($) { 2 "use strict"; 3 4 // Mobile Navigation 5 if ($('.main-nav').length) { 6 var $mobile_nav = $('.main-nav').clone().prop({ 7 class: 'mobile-nav d-lg-none' 8 }); 9 $('body').append($mobile_nav); 10 $('body').prepend('<button type="button" class="mobile-nav-toggle d-lg-none"><i class="fa fa-bars"></i></button>'); 11 $('body').append('<div class="mobile-nav-overly"></div>'); 12 13 $(document).on('click', '.mobile-nav-toggle', function(e) { 14 $('body').toggleClass('mobile-nav-active'); 15 $('.mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 16 $('.mobile-nav-overly').toggle(); 17 }); 18 19 $(document).on('click', '.mobile-nav .drop-down > a', function(e) { 20 e.preventDefault(); 21 $(this).next().slideToggle(300); 22 $(this).parent().toggleClass('active'); 23 }); 24 25 $(document).click(function(e) { 26 var container = $(".mobile-nav, .mobile-nav-toggle"); 27 if (!container.is(e.target) && container.has(e.target).length === 0) { 28 if ($('body').hasClass('mobile-nav-active')) { 29 $('body').removeClass('mobile-nav-active'); 30 $('.mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 31 $('.mobile-nav-overly').fadeOut(); 32 } 33 } 34 }); 35 } else if ($(".mobile-nav, .mobile-nav-toggle").length) { 36 $(".mobile-nav, .mobile-nav-toggle").hide(); 37 } 38 39})(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.