1 2 3(function ($) { 4 "use strict"; 5 6 // custom coursor 7 if ($(".custom-cursor").length) { 8 var cursor = document.querySelector(".custom-cursor-one"); 9 var cursorinner = document.querySelector(".custom-cursor-two"); 10 var a = document.querySelectorAll("a"); 11 12 document.addEventListener("mousemove", function (e) { 13 var x = e.clientX; 14 var y = e.clientY; 15 cursor.style.transform = `translate3d(calc(${x}px - 50%), calc(${y}px - 50%), 0)`; 16 }); 17 18 document.addEventListener("mousemove", function (e) { 19 var x = e.clientX; 20 var y = e.clientY; 21 cursorinner.style.left = x + "px"; 22 cursorinner.style.top = y + "px"; 23 }); 24 25 document.addEventListener("mousedown", function () { 26 cursor.classList.add("click"); 27 cursorinner.classList.add("custom-cursor-innerhover"); 28 }); 29 30 document.addEventListener("mouseup", function () { 31 cursor.classList.remove("click"); 32 cursorinner.classList.remove("custom-cursor-innerhover"); 33 }); 34 35 a.forEach((item) => { 36 item.addEventListener("mouseover", () => { 37 cursor.classList.add("custom-cursor-hover"); 38 }); 39 item.addEventListener("mouseleave", () => { 40 cursor.classList.remove("custom-cursor-hover"); 41 }); 42 }); 43 } 44 45 let hasRun = false; 46 function navContainerFun() { 47 if (!hasRun) { 48 let mobileNav = $('.hamburger-bar'); 49 let sectionHeaderRow = $('.section-header__row'); 50 $(sectionHeaderRow).append(mobileNav); 51 hasRun = true; 52 } 53 } 54 setTimeout(navContainerFun, 300); 55 56 var codeExecuted = false; 57 function mobileMenu() { 58 if ($(".mobileMenu").length && $("#mb_menu_holder").length) { 59 if (!codeExecuted) { 60 const mb_menuUL = $('.mobileMenu'); 61 const mb_menu_holder = $('#mb_menu_holder'); 62 $(mb_menu_holder).append($(mb_menuUL).clone()); 63 } 64 } 65 $('.mobileMenu li').each(function(index, item){ 66 if ($(item).find('ul').length) { 67 $(item).addClass('dropdown-arrow'); 68 } 69 70 $(item).on('click', function(e) { 71 e.stopPropagation(); 72 73 if ($(this).hasClass('dropdown-arrow')) { 74 $('.mobileMenu li').not(this).find('ul').slideUp(300); 75 76 $(this).children('ul').slideToggle(300); 77 78 if(!$(this).hasClass('openUL')) { 79 $(this).siblings().removeClass('openUL'); 80 $(this).addClass('openUL'); 81 }else { 82 $(this).removeClass('openUL'); 83 } 84 85 // For nested submenus 86 $(this).find('ul li').each(function(index, subItem) { 87 $(subItem).off('click').on('click', function(e) { 88 e.stopPropagation(); 89 90 if ($(subItem).hasClass('dropdown-arrow')) { 91 $(subItem).siblings().find('ul').slideUp(300); 92 $(subItem).children('ul').slideToggle(300); 93 94 if(!$(this).hasClass('openUL')) { 95 $(this).siblings().removeClass('openUL'); 96 $(this).addClass('openUL'); 97 }else { 98 $(this).removeClass('openUL'); 99 } 100 } 101 }); 102 }); 103 } 104 }); 105 }); 106 107 $('.menu-icon').each(function(index, item){ 108 const self = $(item); 109 $(self).on('click', function(e) { 110 e.preventDefault(); 111 if(!$(self).hasClass('openMb_menu')) { 112 $(self).parents($('.section-header__row')).find('.hamburger-bar').addClass('openMb_menu'); 113 $(self).parents($('.mobilenav-container')).find('.menu-icon').addClass('openMb_menu'); 114 $('.mobilenav-container').addClass('expanded'); 115 $('body').addClass('locked'); 116 } else { 117 $(self).parents($('.section-header__row')).find('.hamburger-bar').removeClass('openMb_menu'); 118 $(self).parents($('.mobilenav-container')).find('.menu-icon').removeClass('openMb_menu'); 119 $('.mobilenav-container').removeClass('expanded'); 120 $('body').removeClass('locked'); 121 } 122 }); 123 });
124 } 125 if ($(window).width() <= 1200) { 126 mobileMenu(); 127 } 128 129 // path dynamic class add js 130 function dynamicCurrentMenuClass(selector) { 131 let pathFileName = window.location.href.split("/").reverse()[0]; 132 selector.find("li").each(function () { 133 let anchor = $(this).find("a"); 134 if ($(anchor).attr("href") == pathFileName) { 135 $(this).addClass("active"); 136 } 137 }); 138 // if any li has .active elmnt add class 139 selector.children("li").each(function () { 140 if ($(this).find(".active").length) { 141 $(this).addClass("active"); 142 } 143 }); 144 // if no file name return 145 if ("" == pathFileName) { 146 selector.find("li").eq(0).addClass("active"); 147 } 148 } 149 if ($(".mobileMenu").length) { 150 let mainNavUL = $(".mobileMenu"); 151 dynamicCurrentMenuClass(mainNavUL); 152 } 153 154 const throttled = (delay, fn) => { 155 let lastCall = 0; 156 return function (...args) { 157 const now = new Date().getTime(); 158 if (now - lastCall < delay) { 159 return; 160 } 161 lastCall = now; 162 return fn(...args); 163 }; 164};
165 166 // moving html elements js 167 const movableElementsWrapper = document.querySelector("body"); 168 const mouseMoveHandler = (e) => { 169 const y = e.movementY; 170 const x = e.movementX; 171 let moveX = x > 0 ? -x : x; 172 let moveY = y > 0 ? -y : y; 173 const movableElements = document.querySelectorAll(".moving-element"); 174 movableElements.forEach((movableElement) => { 175 gsap.to(movableElement, { x: moveX, y: moveY, duration: 1 }); 176 }); 177 }; 178 const speed = 0.12; 179 const mouseMoveHandler2 = (e) => { 180 const movableElements = document.querySelectorAll(".moving-element"); 181 movableElements.forEach((movableElement) => { 182 const shiftValue = movableElement.getAttribute("data-value"); 183 const moveX = (e.clientX * shiftValue) / 150; 184 const moveY = (e.clientY * shiftValue) / 150; 185 gsap.to(movableElement, { x: moveX, y: moveY, duration: 0.4 }); 186 }); 187 }; 188 const tHandler = throttled(200, mouseMoveHandler2); 189 190 if ($(window).width() >= 1280) { 191 movableElementsWrapper.onmousemove = tHandler; 192 } 193 194 if ($(window).width() >= 1280) { 195 animateDiv(".section-hero__right__square1"); 196 animateDiv(".section-hero__right__square2"); 197 animateDiv(".section-hero__right__square3"); 198 function makeNewPosition() { 199 var h = $(window).height() - 50; 200 var w = $(window).width() - 50; 201 var nh = Math.floor(Math.random() * h); 202 var nw = Math.floor(Math.random() * w); 203 return [nh, nw]; 204 } 205 function animateDiv(myclass) { 206 var newq = makeNewPosition(); 207 $(myclass).animate({ top: newq[-0], left: newq[6] }, 5000, function () { 208 animateDiv(myclass); 209 }); 210 } 211 } 212 213 // owl slider 214 let NextMarketingowlCarousel = $(".nextmarketing-owl__carousel"); 215 if (NextMarketingowlCarousel.length) { 216 NextMarketingowlCarousel.each(function () { 217 let elm = $(this); 218 let options = elm.data("owl-options"); 219 elm.owlCarousel( 220 "object" === typeof options ? options : JSON.parse(options) 221 ); 222 }); 223 } 224 225 // dynamic-year js 226 let dynamicyearElm = $(".dynamic-year"); 227 if (dynamicyearElm.length) { 228 let currentYear = new Date().getFullYear(); 229 dynamicyearElm.html(currentYear); 230 } 231 232 // progress bar js 233 if ($(".count-bar").length) { 234 $(".count-bar").appear( 235 function () { 236 var el = $(this); 237 var percent = el.data("percent"); 238 $(el).css("width", percent).addClass("counted"); 239 }, 240 { 241 accY: -50 242 } 243 ); 244 } 245 246 // =======CounterUp JS-Odometer========>>>>> 247 if ($('.odometer').length > 0) { 248 let initialTop = 0; 249 $(window).on('scroll', function () { 250 var scrollTop = jQuery(this).scrollTop(); 251 var offTop = $(".odometer").offset().top - window.innerHeight; 252 if (scrollTop > offTop) { 253 setTimeout(function () { 254 $('.odometer').each(function () { 255 $(this).html($(this).data('count-to')); 256 }); 257 }, 200); 258 initialTop = 1; 259 } 260 }); 261 262 $(window).on('load',function(){ 263 $(window).trigger('scroll'); 264 }); 265 } 266 267// =======CounterUp JS-Odometer========>>>>> 268 269 // =======CounterUp number JS-========>>>>> 270 if ($(".count-box").length) { 271 $(".count-box").appear( 272 function () { 273 var $t = $(this), 274 n = $t.find(".count-text").attr("data-stop"), 275 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 276 277 if (!$t.hasClass("counted")) { 278 $t.addClass("counted"); 279 $({ 280 countNum: $t.find(".count-text").text() 281 }).animate( 282 { 283 countNum: n 284 }, 285 { 286 duration: r, 287 easing: "linear", 288 step: function () { 289 $t.find(".count-text").text(Math.floor(this.countNum)); 290 }, 291 complete: function () { 292 $t.find(".count-text").text(this.countNum); 293 } 294 } 295 ); 296 } 297 }, 298 { 299 accY: 0 300 } 301 ); 302 } 303 304 // price tab js 305 function tabSwitchFun(tabId, switchId) { 306 $('#'+tabId).closest('.tabs-wrapper').find('.tab-item').removeClass('tab-active'); 307 $('.tab-item[data-tab="'+tabId+'"]').addClass('tab-active'); 308 309 $('#'+tabId).closest('.tabs-wrapper').find('.tab-content').removeClass('content-active'); 310 $('#'+tabId).addClass('content-active'); 311 312 if (tabId === 'tab1') { 313 $('#'+switchId).removeClass('switch-year').addClass('switch-month'); 314 } else if (tabId === 'tab2') { 315 $('#'+switchId).removeClass('switch-month').addClass('switch-year'); 316 } 317 } 318 319 // tab click event handler 320 $('.tab-item').each(function(index, item) { 321 $(item).on("click", function() { 322 if($(this).parents('.tabs-wrapper').find('.slide').length > 0){ 323 let position = $(this).position().left; 324 let width = $(this).width(); 325 console.log(position); 326 let slide = $('.slide'); 327 slide.css({ 328 "left": position + "px", 329 "width": width + "px" 330 }); 331 } 332 333 let tabId = $(this).attr('data-tab'); 334 let switchId = $(this).closest('.tab-item-parent').find('.section-price-table__tabs-switch input[type="checkbox"]').attr('id'); 335 tabSwitchFun(tabId, switchId); 336 });
337 }); 338 339 // Switch change event handler 340 $('.section-price-table__tabs-switch input[type="checkbox"]').change(function(){ 341 let switchId = $(this).attr('id'); 342 let tabId = $(this).closest('.tab-item-parent').find('.tab-item.tab-active').attr('data-tab'); 343 if ($(this).is(":checked")) { 344 tabSwitchFun('tab2', switchId); 345 } else { 346 tabSwitchFun('tab1', switchId); 347 } 348 }); 349 350 // price tbl match height js 351 matchHeight(); 352 function matchHeight() { 353 if($('.without-switchtab').length){ 354 if($(window).width() > 1280) { 355 let highestNull = null; 356 let initialHeight = 0; 357 let maxHeight = $(".section-price-table__planing"); 358 $(maxHeight).each(function(index, item){ 359 let eachHeight = $(item).height(); 360 if(eachHeight > initialHeight){ 361 initialHeight = eachHeight; 362 highestNull = $(this); 363 } 364 }); 365 $(maxHeight).css({"min-height": initialHeight+"px"}); 366 } 367 } 368 } 369 370 $('.section-price__titlewrap').each(function(){ 371 let $thisParent = $(this); 372 let $valueCheck = $thisParent.children('.section-price__valuetag'); 373 if ($valueCheck.length > 0) { 374 $thisParent.addClass('adjust-padding'); 375 } 376 }); 377 378 // FAQ js 379 if($('.section-faq__row').length) { 380 $('.section-faq__title').each(function(index){ 381 let selfTitle = $(this); 382 let selfParent = selfTitle.parent(); 383 $(selfTitle).on("click",function(){ 384 if(!$(selfParent).hasClass('active')) { 385 $(selfParent).siblings().removeClass('active'); 386 $(selfParent).addClass('active'); 387 $(selfParent).siblings().find('.section-faq__content').slideUp(300); 388 $(selfParent).find('.section-faq__content').slideDown(300); 389 }else { 390 $(selfParent).removeClass('active'); 391 $(selfParent).find('.section-faq__content').slideUp(300); 392 } 393 }); 394 if (index === 0) { 395 $(selfParent).find('.section-faq__content').slideDown(300); 396 $(selfParent).addClass('active'); 397 } 398 }); 399 } 400 401 // =======Sticky-header========>>>>> 402 // pricing section sticky js 403 if($(".section-header").length) { 404 if(!$(".section-header").hasClass('one-page-scroll-header')) { 405 $(".section-header").clone().insertAfter(".section-header").addClass("header-sticky-cloned"); 406 } 407 } 408 409 let previousScroll = 0; 410 $(window).on('scroll', function () { 411 var scroll = $(window).scrollTop(); 412 let headerHeight = $(".section-header").height() + 10; 413 if (scroll > 500) { 414 if (scroll > previousScroll) { 415 $(".section-header").removeClass("sticky-active"); 416 $(".sticky-elements").css({ "top": 30+"px"}); 417 } else { 418 $(".section-header").addClass("sticky-active"); 419 $(".sticky-elements").css({ "top": headerHeight+"px"}); 420 } 421 } else { 422 $(".section-header").removeClass("sticky-active"); 423 } 424 425 if ($('.one-page-scroll-header').length > 0) { 426 if (scroll > 0) { 427 if($(".section-header").hasClass('one-page-scroll-header')) { 428 $(".section-header").addClass("sticky-active"); 429 }else { 430 $(".section-header").removeClass("sticky-active"); 431 } 432 } 433 } 434 previousScroll = scroll; 435 436 OnePageMenuScroll(); 437 }); 438 // =======Sticky-header========>>>>> 439 440 // marquee js 441 marqueeFun(); 442 function marqueeFun() { 443 if($('.marquee-parent').length) { 444 let marqueeRun = false; 445 setTimeout(function() { 446 if (!marqueeRun) { 447 const root = document.documentElement; 448 const marqueeElementsDisplayed = getComputedStyle(root).getPropertyValue("--marquee-elements-displayed"); 449 const marqueeContent = document.querySelector(".marquee-parent"); 450 root.style.setProperty("--marquee-elements", marqueeContent.children.length); 451 for (let i = 0; i < marqueeElementsDisplayed.length; i++) { 452 marqueeContent.appendChild(marqueeContent.children[i].cloneNode(true)); 453 }
454 marqueeRun = true; 455 } 456 }, 600); 457 458 const scrollerMarquee = document.querySelectorAll(".marquee-parent"); 459 scrollerMarquee.forEach((scroller) => { 460 scroller.setAttribute("data-animated", true); 461 }); 462 463 let textItemWrap = jQuery('.marquee-parent'); 464 let textItem = jQuery('.marquee-clone'); 465 textItemWrap.each(function() { 466 for (let i = 0; i < 5; i++) { 467 jQuery(this).append(textItem.clone()); 468 } 469 }); 470 } 471 }; 472 473 // custom select box js 474 customSelect(); 475 function customSelect(){ 476 const custom_selected = $('.custom_selected'); 477 const custom_select_opt_wrap = $('.custom_select_opt_wrap'); 478 const custom_select_opt = $('.custom_select_opt'); 479 480 custom_selected.each(function(index, elem) { 481 $(elem).on('click', function(e) { 482 e.preventDefault(); 483 const selfThis = $(this); 484 const parentCustomSelect = selfThis.parent(); 485 if (!parentCustomSelect.hasClass('open_opt_wrap')) { 486 parentCustomSelect.addClass('open_opt_wrap'); 487 parentCustomSelect.find(custom_select_opt_wrap).slideDown(300); 488 } else { 489 parentCustomSelect.removeClass('open_opt_wrap'); 490 parentCustomSelect.find(custom_select_opt_wrap).slideUp(300); 491 } 492 }); 493 }); 494 495 custom_select_opt.each(function(index, elem) { 496 $(elem).on('click', function(e) { 497 e.preventDefault(); 498 const selfThis = $(this); 499 const parentCustomSelect = selfThis.parents('.custom-select'); 500 parentCustomSelect.removeClass('open_opt_wrap'); 501 parentCustomSelect.find(custom_select_opt_wrap).slideUp(300); 502 503 if (selfThis.text() !== "Select a Service") { 504 parentCustomSelect.find(custom_selected).text(selfThis.text()); 505 parentCustomSelect.find(custom_selected).addClass('custom_selected').addClass('attr-remove'); 506 } else { 507 parentCustomSelect.find(custom_selected).text("Select a Service"); 508 parentCustomSelect.find(custom_selected).removeClass('custom_selected').removeClass('attr-remove'); 509 } 510 custom_select_opt.removeAttr('data-select'); 511 if (selfThis.text() !== "Select a Service") { 512 selfThis.attr('data-select', 'selected'); 513 } else { 514 parentCustomSelect.find(custom_selected).removeAttr('data-select'); 515 } 516 parentCustomSelect.find(custom_selected).attr('data-select', 'selected'); 517 }); 518 }); 519 } 520 521 // custom language js 522 customLng(); 523 function customLng(){ 524 const custom_Lng = $('.lng-selected'); 525 const custom_Lng_opt_wrap = $('.topbar-two__themelng-opt'); 526 const custom_Lng_opt = $('.lng-opt'); 527 528 custom_Lng.each(function(index, elem) { 529 $(elem).on('click', function(e) { 530 e.preventDefault(); 531 const selfThis = $(this); 532 const parentCustomLng = selfThis.parent(); 533 if (!parentCustomLng.hasClass('open_opt_wrap')) { 534 parentCustomLng.addClass('open_opt_wrap'); 535 parentCustomLng.find(custom_Lng_opt_wrap).slideDown(200); 536 } else { 537 parentCustomLng.removeClass('open_opt_wrap'); 538 parentCustomLng.find(custom_Lng_opt_wrap).slideUp(200); 539 } 540 }); 541 }); 542 custom_Lng_opt.each(function(index, elem) { 543 $(elem).on('click', function(e) { 544 e.preventDefault(); 545 const selfThis = $(this); 546 const selfHTML = selfThis.html(); 547 const parentCustomLng = selfThis.parents('.topbar-two__themelngwrap'); 548 parentCustomLng.removeClass('open_opt_wrap'); 549 parentCustomLng.find(custom_Lng_opt_wrap).slideUp(200); 550 parentCustomLng.find(custom_Lng).html(selfHTML); 551 }); 552 }); 553 } 554 555 function OnePageMenuScroll() { 556 var windScroll = $(window).scrollTop(); 557 if (windScroll >= 117) { 558 var menuAnchor = $(".one-page-scroll-menu .scrollToLink").children("a"); 559 menuAnchor.each(function () { 560 var sections = $(this).attr("href"); 561 $(sections).each(function () { 562 if ($(this).offset().top <= windScroll + 100) { 563 var SectionId = $(sections).attr("id"); 564 $(".one-page-scroll-menu").find("a[href*=\\#" + SectionId + "]"); 565 } 566 }); 567 }); 568 } 569 } 570 571 // Isotope js 572 isotopefun(); 573 function isotopefun() { 574 if ($(".masonry-layout").length) { 575 $(".masonry-layout").imagesLoaded(function () { 576 $(".masonry-layout").isotope({ 577 layoutMode: "masonry" 578 }); 579 }); 580 } 581 if ($(".fitRow-layout").length) { 582 $(".fitRow-layout").imagesLoaded(function () { 583 $(".fitRow-layout").isotope({ 584 layoutMode: "fitRows" 585 }); 586 }); 587 } 588 589 if ($(".post-filter").length) { 590 var postFilterList = $(".post-filter li"); 591 // for first init 592 $(".filter-layout").isotope({ 593 filter: ".filter-item", 594 animationOptions: { 595 duration: 500, 596 easing: "linear", 597 queue: false 598 } 599 }); 600 // on click filter links 601 postFilterList.on("click", function () { 602 var Self = $(this); 603 var selector = Self.attr("data-filter"); 604 postFilterList.removeClass("active"); 605 Self.addClass("active"); 606 607 $(".filter-layout").isotope({ 608 filter: selector, 609 animationOptions: { 610 duration: 500, 611 easing: "linear", 612 queue: false 613 } 614 }); 615 return false; 616 }); 617 } 618 } 619 620 // =======Magnific-PopUp========>>>>> 621 if ($('.image-link').length > 0) { 622 $('.image-link').magnificPopup({ 623 type: 'image', 624 gallery: { 625 enabled: true 626 }, 627 zoom: { 628 enabled: true, 629 duration: 300, // don't foget to change the duration also in CSS 630 opener: function (element) { 631 return element.find('img'); 632 } 633 } 634 });
635 } 636 637 // Video popup 638 if ($('.video-popup-link').length > 0) { 639 $('.video-popup-link').magnificPopup({ 640 disableOn: 200, 641 type: 'iframe', 642 mainClass: 'mfp-fade', 643 removalDelay: 160, 644 preloader: false, 645 fixedContentPos: false 646 }); 647 } 648 // =======Magnific-PopUp========>>>>> 649 650 // =========Leaflet map=========>>>>> 651 if ($('#map').length > 0) { 652 var map = L.map('map').setView([40.712776, -74.005974], 12); 653 var locationsArray = []; 654 655 function clickZoom(e) { 656 map.setView(e.target.getLatLng(), 16); 657 } 658 659 $.each(NextMarketingLocations, function(index, location) { 660 // Create Marker 661 var marker = L.marker(location.markerPoint, { 662 title: location.title, 663 className: "marker-usa" // Class for the marker 664 }).addTo(map); 665 666 // Bind Popup 667 marker.bindPopup(`<div class="card card-map nextmarketing-map-card"><div class="card-body"> 668 <h5 class="card-title service-title">${location.title}</h5><p class="mb-0 fw-semibold">${location.subtitle}</p><p class="mb-0 contact-home">${location.address}</p> 669 </div></div>`).on('click', clickZoom); 670 671 // Store the location in the array 672 locationsArray.push({ marker: marker, location: location }); 673 }); 674 675 // Handle external link clicks 676 $('.btn-map-direction').on('click', function(e) { 677 e.preventDefault(); 678 var markerTitle = $(this).data('title'); 679 680 // Find the marker in the array based on the title 681 var selectedMarker = locationsArray.find(function(item) { 682 return item.location.title === markerTitle; 683 }); 684 685 // Open the popup for the selected marker 686 if (selectedMarker) { 687 selectedMarker.marker.openPopup(); 688 // Set the zoom level to 16
689 map.setView(selectedMarker.marker.getLatLng(), 12); 690 } 691 }); 692 693 L.tileLayer('https://mt1.google.com/vt/lyrs=r&x={x}&y={y}&z={z}', { 694 maxZoom: 26, 695 attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' 696 }).addTo(map); 697 698 // Outside click event 699 $(document).on('click', function(e) { 700 var mapContainer = $('#map'); 701 var isClickInsideMap = mapContainer.has(e.target).length > 0 || mapContainer.is(e.target); 702 }); 703 } 704 // =========Leaflet map=========>>>>> 705 706 wowfunction(); 707 function wowfunction() { 708 new WOW({ 709 boxClass: 'wow', // default 710 animateClass: 'animated', // default 711 offset: 0, // default 712 mobile: true, // default 713 live: true // default 714 }).init(); 715 } 716 717 $(document).on('submit', '#contactForm, #callRequestForm, #downloadForm',function(e) { 718 e.preventDefault(); 719 var form = $(this); 720 var formData = form.serialize(); 721 var responseDiv = form.find('.response'); 722 form.find('[type="submit"]').prop('disabled', true); 723 formData += '&id='+form.attr('id'); 724 responseDiv.html('<p>Working....</p>'); 725 $.ajax({
726 type: 'POST', 727 url: 'mail.php', 728 data: formData, 729 success: function(response) { 730 var data = JSON.parse(response); 731 if (data.error) { 732 responseDiv.empty().html('<div class="alert alert-error">'+data.msg+'</div>'); 733 } else { 734 responseDiv.empty().html('<div class="alert alert-sucess">'+data.msg+'</div>'); 735 form.get(0).reset(); 736 } 737 form.find('[type="submit"]').prop('disabled', false); 738 }, 739 error: function(error) { 740 console.log('Error:', error); 741 form.find('[type="submit"]').prop('disabled', false); 742 } 743 }); 744 }); 745 746 function preloaderFun(){ 747 let progressBar = $(".loader-progress-bar"); 748 let progressValue = 0; 749 let interval = setInterval(increaseProgress, 1); 750 function increaseProgress() { 751 progressValue += 1; 752 progressBar.css("width", progressValue + "%"); 753 $(".percentage").text(progressValue + "%"); 754 if (progressValue >= 100) { 755 clearInterval(interval); 756 $(".preloader").fadeOut(100); 757 } 758 } 759 } 760 761 $(window).on('load', function() { 762 wowfunction(); 763 isotopefun(); 764 preloaderFun(); 765 }); 766 $(window).on('resize', function() { 767 matchHeight(); 768 }); 769})(jQuery); 770 771document.addEventListener("DOMContentLoaded", function () { 772 const topBar = document.querySelector('.topbar-two');
773 const themeModeSticky = document.querySelector('.theme-mode-sticky'); 774 if(themeModeSticky) { 775 if (!topBar > 0) { 776 themeModeSticky.classList.add('visible'); 777 }else { 778 themeModeSticky.classList.remove('visible'); 779 } 780 } 781 782 let progressCircleContainer = document.querySelectorAll('.progress-circle-container'); 783 if(progressCircleContainer.length){ 784 // Progress circle 785 function updateProgressCircle() { 786 const themeModeSticky = document.querySelector('.theme-mode-sticky'); 787 const progressElement = document.querySelector(".progress-circle-bar"); 788 const totalHeight = document.body.scrollHeight - window.innerHeight; 789 let progress = (window.pageYOffset / totalHeight) * 283; 790 progress = Math.min(progress, 283); 791 progressElement.style.strokeDashoffset = 283 - progress; 792 if (window.scrollY > 500) { 793 themeModeSticky.classList.add("show"); 794 } else { 795 themeModeSticky.classList.remove("show"); 796 } 797 } 798 function scrollToTop() { 799 window.scrollTo({ top: 0, behavior: "smooth" }); 800 } 801 const scrollToTopElement = document.querySelector(".scroll-to-top"); 802 scrollToTopElement.addEventListener("click", scrollToTop); 803 updateProgressCircle(); 804 window.addEventListener("scroll", updateProgressCircle); 805 window.addEventListener("resize", updateProgressCircle); 806 } 807 808 const questionIcon = document.querySelector('.question-icon'); 809 if(questionIcon) { 810 questionIcon.addEventListener("click", function(){ 811 let selfThis = this; 812 if (!selfThis.classList.contains('open')) { 813 selfThis.classList.add('open'); 814 document.querySelector('.quick-message').classList.add('open'); 815 }else{ 816 selfThis.classList.remove('open'); 817 document.querySelector('.quick-message').classList.remove('open'); 818 } 819 }); 820 821 let msgCross = document.querySelector('.msg-cross'); 822 if(msgCross) { 823 msgCross.addEventListener('click', function(){ 824 questionIcon.classList.remove('open'); 825 document.querySelector('.quick-message').classList.remove('open'); 826 }) 827 } 828 } 829 830 function themeModeFun(){ 831 const topbarModeicon = document.querySelectorAll('.topbar-two__modeicon'); 832 const btn = document.querySelectorAll(".themeModeBtn"); 833 btn.forEach((item) => { 834 item.addEventListener("click", () => { 835 const idCheck = item.getAttribute("data-id"); 836 if (idCheck === "light") { 837 document.documentElement.setAttribute("data-bs-theme", "light"); 838 window.localStorage.setItem("theme", "light"); 839 } else { 840 document.documentElement.setAttribute("data-bs-theme", "dark"); 841 window.localStorage.setItem("theme", "dark"); 842 } 843 item.parentNode.classList.remove('visibility'); 844 const selfHTML = item.outerHTML; 845 topbarModeicon.innerHTML = selfHTML; 846 }); 847 }); 848 849 if(topbarModeicon) { 850 topbarModeicon.forEach(function(elms){ 851 elms.addEventListener("click", function (e) { 852 selfThis = this; 853 $('.topbar-two__themelng-opt').slideUp(200); 854 $('.topbar-two__themelngwrap').removeClass('open_opt_wrap'); 855 }); 856 }) 857 } 858 } 859 themeModeFun(); 860});
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.