1/*----------------------------------------------------------------------------------- 2 3 =================== 4 Js INDEX 5 =================== 6 ## Main Menu JS 7 ## Offcanvas Overlay JS 8 ## Preloader JS 9 ## Sticky JS 10 ## Back To Top JS 11 ## Magnific-popup JS 12 ## Slick Slider JS 13 ## Counter JS 14 ## Isotope JS 15 ## Nice Select JS 16 ## AOS Js 17 ## Background Image JS 18 ## Document Ready 19 20-----------------------------------------------------------------------------------*/ 21 22(function($) { 23 'use strict'; 24 25 //===== Main Menu 26 27 function mainMenu() { 28 var var_window = $(window), 29 navContainer = $('.header-navigation'), 30 navbarToggler = $('.navbar-toggler'), 31 navMenu = $('.theme-nav-menu'), 32 navMenuLi = $('.theme-nav-menu ul li ul li'), 33 closeIcon = $('.navbar-close'); 34 navbarToggler.on('click', function() { 35 navbarToggler.toggleClass('active'); 36 navMenu.toggleClass('menu-on'); 37 }); 38 closeIcon.on('click', function() { 39 navMenu.removeClass('menu-on'); 40 navbarToggler.removeClass('active'); 41 }); 42 navMenu.find("li a").each(function() { 43 if ($(this).children('.dd-trigger').length < 1) { 44 if ($(this).next().length > 0) { 45 $(this).append('<span class="dd-trigger"><i class="far fa-angle-down"></i></span>') 46 } 47 } 48 }); 49 navMenu.on('click', '.dd-trigger', function(e) { 50 e.preventDefault(); 51 $(this).parent().parent().siblings().children('ul.sub-menu').slideUp(); 52 $(this).parent().next('ul.sub-menu').stop(true, true).slideToggle(350); 53 $(this).toggleClass('sub-menu-open'); 54 }); 55 }; 56 57 //===== Offcanvas Overlay 58 59 function offCanvas() { 60 const $overlay = $(".offcanvas__overlay"); 61 const $toggler = $(".navbar-toggler"); 62 const $menu = $(".theme-nav-menu"); 63 $toggler.add($overlay).add(".navbar-close, .panel-close-btn").on("click", function () { 64 $overlay.toggleClass("overlay-open"); 65 if ($(this).is($overlay)) { 66 $toggler.removeClass("active"); 67 $menu.removeClass("menu-on"); 68 } 69 }); 70 $(window).on("resize", function () { 71 if ($(window).width() > 991) $overlay.removeClass("overlay-open"); 72 }); 73 } 74 75 //===== Windows load 76 77 $(window).on('load', function(event) { 78 //===== Preloader 79 $('.preloader').delay(500).fadeOut(500); 80 }) 81 82 //===== Sticky 83 84 $(window).on('scroll', function(event) { 85 var scroll = $(window).scrollTop(); 86 if (scroll < 100) { 87 $(".header-navigation").removeClass("sticky"); 88 } else { 89 $(".header-navigation").addClass("sticky"); 90 } 91 }); 92 93 //===== Back to top 94 95 $(window).on('scroll', function(event) { 96 if ($(this).scrollTop() > 600) { 97 $('.back-to-top').fadeIn(200) 98 } else { 99 $('.back-to-top').fadeOut(200) 100 } 101 }); 102 $('.back-to-top').on('click', function(event) { 103 event.preventDefault(); 104 $('html, body').animate({ 105 scrollTop: 0, 106 }, 1500); 107 }); 108 109 //===== Magnific-popup js 110 111 if ($('.video-popup').length){ 112 $('.video-popup').magnificPopup({ 113 type: 'iframe', 114 removalDelay: 300, 115 mainClass: 'mfp-fade' 116 }); 117 } 118 if ($('.img-popup').length){ 119 $(".img-popup").magnificPopup({ 120 type: "image", 121 gallery: { 122 enabled: true 123 } 124 }); 125 } 126 127 // ==== Counter 128 129 if ($('.counter').length) { 130 const observer = new IntersectionObserver((entries, observer) => { 131 entries.forEach(entry => { 132 if (entry.isIntersecting) { 133 $(entry.target).counterUp({ 134 delay: 100, 135 time: 4000 136 }); 137 observer.unobserve(entry.target); 138 } 139 }); 140 }, { 141 threshold: 1.0 142 }); 143 $('.counter').each(function() { 144 observer.observe(this); 145 }); 146 } 147 148 //====== Isotope js 149 $('.filter-nav-items li').on('click', function () { 150 $(this).siblings('.active').removeClass('active'); 151 $(this).addClass('active'); 152 var filterValue = $(this).attr('data-filter'); 153 $('.isotope-grid').isotope({ filter: filterValue });
154 }); 155 156 if ($('.luxivo-isotope').length) { 157 $('.luxivo-isotope').imagesLoaded(function () { 158 $('.isotope-grid').isotope({ 159 itemSelector: '.isotope-filter-item', 160 layoutMode: 'fitRows' 161 }) 162 }); 163 } 164 165 //===== Dynamic Background 166 167 function dynamicBackground() { 168 $('[data-src]').each(function () { 169 var src = $(this).attr('data-src'); 170 $(this).css({ 171 'background-image': 'url(' + src + ')', 172 }); 173 }); 174 } 175 176 //===== Document Ready 177 178 $(function() { 179 mainMenu(); 180 offCanvas(); 181 dynamicBackground(); 182 }); 183 184})(window.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.