1(function ($) { 2 $(document).ready(function () { 3 "use strict"; 4 5 6 // TAB 7 $(".tab-nav li").on('click', function (e) { 8 $(".tab-item").hide(); 9 $(".tab-nav li").removeClass('active'); 10 $(this).addClass("active"); 11 var selected_tab = $(this).find("a").attr("href"); 12 $(selected_tab).stop().show(); 13 return false; 14 }); 15 16 17 // LOGO HOVER 18 $(".site-menu ul li").hover(function () { 19 $('.site-menu ul li').not(this).css({ 20 "opacity": "1" 21 }); 22 }, 23 function () { 24 $('.site-menu ul li').not(this).css({ 25 "opacity": "1" 26 }); 27 }); 28 29 30 // HAMBURGER MENU 31 $('.hamburger-menu').on('click', function (e) { 32 $(this).toggleClass('open'); 33 $(".side-widget").toggleClass('active'); 34 $("body").toggleClass("overflow"); 35 }); 36 37 // PAGE TRANSITION 38 $('body a').on('click', function (e) { 39 40 var target = $(this).attr('target'); 41 var fancybox = $(this).data('fancybox'); 42 var url = this.getAttribute("href"); 43 if (target != '_blank' && typeof fancybox == 'undefined' && url.indexOf('') < 0) { 44 45 46 e.preventDefault(); 47 var url = this.getAttribute("href"); 48 if (url.indexOf('') != -1) { 49 var hash = url.substring(url.indexOf('#')); 50 51 52 if ($('body ' + hash).length != 0) { 53 $('.page-transition').removeClass("active"); 54 55 56 } 57 } else { 58 $('.page-transition').toggleClass("active"); 59 setTimeout(function () { 60 window.location = url; 61 }, 1000); 62 63 } 64 } 65 }); 66 67 68 }); 69 // END DOCUMENT READY 70 71 // DATA BACKGROUND IMAGE 72 var pageSection = $("*"); 73 pageSection.each(function (indx) { 74 if ($(this).attr("data-background")) { 75 $(this).css("background", "url(" + $(this).data("background") + ")"); 76 } 77 }); 78 79 80 81 // DATA BACKGROUND COLOR 82 var pageSection = $("*"); 83 pageSection.each(function (indx) { 84 if ($(this).attr("data-background")) { 85 $(this).css("background", $(this).data("background")); 86 } 87 }); 88 89 90 // WOW ANIMATION 91 wow = new WOW({ 92 animateClass: 'animated', 93 offset: 0 94 }); 95 wow.init(); 96 97 98 // CAROUSEL CLASSES SLIDER 99 var swiper = new Swiper('.carousel-classes', { 100 slidesPerView: '4', 101 spaceBetween: 30, 102 loop: 'true', 103 draggable: 'true', 104 navigation: { 105 prevEl: '.button-prev1', 106 nextEl: '.button-next1', 107 }, 108 pagination: { 109 el: '.swiper-pagination', 110 clickable: true, 111 }, 112 breakpoints: { 113 640: { 114 slidesPerView: 1, 115 spaceBetween: 15, 116 }, 117 768: { 118 slidesPerView: 2, 119 spaceBetween: 30, 120 }, 121 1024: { 122 slidesPerView: 3, 123 spaceBetween: 30, 124 }, 125 } 126 }); 127 128 129 // MAIN SLIDER 130 var swiper = new Swiper('.main-slider', { 131 slidesPerView: '1', 132 spaceBetween: 0, 133 speed: 1000, 134 effect: 'fade', 135 fadeEffect: { 136 crossFade: true 137 }, 138 loop: true, 139 draggable: 'true', 140 autoplay: { 141 delay: 15000, 142 disableOnInteraction: false, 143 }, 144 navigation: { 145 prevEl: '.button-prev', 146 nextEl: '.button-next', 147 }, 148 pagination: { 149 el: '.swiper-pagination', 150 clickable: true, 151 }, 152 }); 153 154 155 // COUNTER 156 $(document).scroll(function () { 157 $('.odometer').each(function () { 158 var parent_section_postion = $(this).closest('section').position(); 159 var parent_section_top = parent_section_postion.top; 160 if ($(document).scrollTop() > parent_section_top - 300) { 161 if ($(this).data('status') == 'yes') { 162 $(this).html($(this).data('count')); 163 $(this).data('status', 'no'); 164 } 165 } 166 }); 167 }); 168 169 170 // PRELOADER 171 $(window).load(function () { 172 $("body").addClass("page-loaded"); 173 }); 174 175 176})(jQuery); 177 178 // accordion 179 let question = document.querySelectorAll(".question"); 180 181question.forEach(question => { 182 question.addEventListener("click", event => { 183 const active = document.querySelector(".question.active"); 184 if(active && active !== question ) { 185 active.classList.toggle("active"); 186 active.nextElementSibling.style.maxHeight = 0; 187 } 188 question.classList.toggle("active"); 189 const answer = question.nextElementSibling; 190 if(question.classList.contains("active")){ 191 answer.style.maxHeight = answer.scrollHeight + "px"; 192 } else { 193 answer.style.maxHeight = 0; 194 } 195 }) 196}) 197//sticky 198$(window).scroll(function(){ 199 if($(this).scrollTop() > 100){ 200 $('.navbar').addClass('sticky') 201 } else{ 202 $('.navbar').removeClass('sticky') 203 } 204});
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.