1(function($) { 2 3 "use strict"; 4 5 6 7 //Update Header Style and Scroll to Top 8 function headerStyle() { 9 if($('.main-header').length){ 10 var windowpos = $(window).scrollTop(); 11 var siteHeader = $('.main-header'); 12 var scrollLink = $('.scroll-top'); 13 if (windowpos >= 110) { 14 siteHeader.addClass('fixed-header'); 15 scrollLink.addClass('open'); 16 } else { 17 siteHeader.removeClass('fixed-header'); 18 scrollLink.removeClass('open'); 19 } 20 } 21 } 22 23 headerStyle(); 24 25 26 //Submenu Dropdown Toggle 27 if($('.main-header li.dropdown ul').length){ 28 $('.main-header .navigation li.dropdown').append('<div class="dropdown-btn"><span class="fas fa-angle-down"></span></div>'); 29 30 } 31 32 //Mobile Nav Hide Show 33 if($('.mobile-menu').length){ 34 35 $('.mobile-menu .menu-box').mCustomScrollbar(); 36 37 var mobileMenuContent = $('.main-header .menu-area .main-menu').html(); 38 $('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent); 39 $('.sticky-header .main-menu').append(mobileMenuContent); 40 41 //Dropdown Button 42 $('.mobile-menu li.dropdown .dropdown-btn').on('click', function() { 43 $(this).toggleClass('open'); 44 $(this).prev('ul').slideToggle(500); 45 }); 46 //Dropdown Button 47 $('.mobile-menu li.dropdown .dropdown-btn').on('click', function() { 48 $(this).prev('.megamenu').slideToggle(900); 49 }); 50 //Menu Toggle Btn 51 $('.mobile-nav-toggler').on('click', function() { 52 $('body').addClass('mobile-menu-visible'); 53 }); 54 55 //Menu Toggle Btn 56 $('.mobile-menu .menu-backdrop,.mobile-menu .close-btn').on('click', function() { 57 $('body').removeClass('mobile-menu-visible'); 58 }); 59 } 60 61 62 63 // Scroll to a Specific Div 64 if($('.scroll-to-target').length){ 65 $(".scroll-to-target").on('click', function() { 66 var target = $(this).attr('data-target'); 67 // animate 68 $('html, body').animate({ 69 scrollTop: $(target).offset().top 70 }, 1000); 71 72 }); 73 } 74 75 // Elements Animation 76 if($('.wow').length){ 77 var wow = new WOW({ 78 mobile: false 79 }); 80 wow.init(); 81 } 82 83 //Contact Form Validation 84 if($('#contact-form').length){ 85 $('#contact-form').validate({ 86 rules: { 87 username: { 88 required: true 89 }, 90 email: { 91 required: true, 92 email: true 93 }, 94 phone: { 95 required: true 96 }, 97 city: { 98 required: true 99 }, 100 code: { 101 required: true 102 }, 103 address: { 104 required: true 105 }, 106 activity: { 107 required: true 108 }, 109 subject: { 110 required: true 111 }, 112 message: { 113 required: true 114 } 115 } 116 }); 117 } 118 119 //Fact Counter + Text Count 120 if($('.count-box').length){ 121 $('.count-box').appear(function(){ 122 123 var $t = $(this), 124 n = $t.find(".count-text").attr("data-stop"), 125 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 126 127 if (!$t.hasClass("counted")) { 128 $t.addClass("counted"); 129 $({ 130 countNum: $t.find(".count-text").text() 131 }).animate({ 132 countNum: n 133 }, { 134 duration: r, 135 easing: "linear", 136 step: function() { 137 $t.find(".count-text").text(Math.floor(this.countNum)); 138 }, 139 complete: function() { 140 $t.find(".count-text").text(this.countNum); 141 } 142 }); 143 } 144 145 },{accY: 0}); 146 } 147 148 149 //LightBox / Fancybox 150 if($('.lightbox-image').length) { 151 $('.lightbox-image').fancybox({ 152 openEffect : 'fade', 153 closeEffect : 'fade', 154 helpers : { 155 media : {} 156 } 157 }); 158 } 159 160 161 //Tabs Box 162 if($('.tabs-box').length){ 163 $('.tabs-box .tab-buttons .tab-btn').on('click', function(e) { 164 e.preventDefault(); 165 var target = $($(this).attr('data-tab')); 166 167 if ($(target).is(':visible')){ 168 return false; 169 }else{ 170 target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn'); 171 $(this).addClass('active-btn'); 172 target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0); 173 target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab'); 174 $(target).fadeIn(300); 175 $(target).addClass('active-tab'); 176 } 177 }); 178 } 179 180 181 182 //Accordion Box 183 if($('.accordion-box').length){ 184 $(".accordion-box").on('click', '.acc-btn', function() { 185 186 var outerBox = $(this).parents('.accordion-box'); 187 var target = $(this).parents('.accordion'); 188 189 if($(this).hasClass('active')!==true){ 190 $(outerBox).find('.accordion .acc-btn').removeClass('active'); 191 } 192 193 if ($(this).next('.acc-content').is(':visible')){ 194 return false;
195 }else{ 196 $(this).addClass('active'); 197 $(outerBox).children('.accordion').removeClass('active-block'); 198 $(outerBox).find('.accordion').children('.acc-content').slideUp(300); 199 target.addClass('active-block'); 200 $(this).next('.acc-content').slideDown(300); 201 } 202 }); 203 } 204 205 206 // banner-carousel 207 if ($('.banner-carousel').length) { 208 $('.banner-carousel').owlCarousel({ 209 loop:true, 210 margin:0, 211 nav:true, 212 animateOut: 'fadeOut', 213 animateIn: 'fadeIn', 214 active: true, 215 smartSpeed: 2000, 216 autoplay: 6000, 217 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 218 responsive:{ 219 0:{ 220 items:1 221 }, 222 600:{ 223 items:1 224 }, 225 800:{ 226 items:1 227 }, 228 1024:{ 229 items:1 230 } 231 } 232 }); 233 } 234 235 236 // project-carousel 237 if ($('.project-carousel').length) { 238 $('.project-carousel').owlCarousel({ 239 loop:true, 240 margin:0, 241 nav:false, 242 smartSpeed: 3000, 243 autoplay: true, 244 navText: [ '<span class="flaticon-left"></span>', '<span class="flaticon-right"></span>' ], 245 responsive:{ 246 0:{ 247 items:1 248 }, 249 480:{ 250 items:2 251 }, 252 600:{ 253 items:3 254 }, 255 800:{ 256 items:4 257 }, 258 1200:{ 259 items:5 260 } 261 262 } 263 }); 264 } 265 266 //Add One Page nav 267 // if($('.scroll-nav').length) { 268 // $('.scroll-nav').onePageNav(); 269 // } 270 271 272 273 274 /* ========================================================================= 275 When document is Scrollig, do 276 ========================================================================== */ 277 278 jQuery(document).on('ready', function () { 279 (function ($) { 280 // add your functions 281 282 })(jQuery); 283 }); 284 285 286 287 /* ========================================================================== 288 When document is Scrollig, do 289 ========================================================================== */ 290 291 $(window).on('scroll', function() { 292 headerStyle(); 293 }); 294 295 296 297 /* ========================================================================== 298 When document is loaded, do 299 ========================================================================== */ 300 301 $(window).on('load', function() { 302 303 $('#handle-preloader').fadeOut(); 304 $('.preloader').delay(150).fadeOut('slow'); 305 $('body').delay(150).css({'overflow':'visible'}); 306 }); 307 308 309 310})(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.