1(function ($) { 2 "use strict"; 3 4 function thmSwiperInit() { 5 // swiper slider 6 if ($(".thm-swiper__slider").length) { 7 $(".thm-swiper__slider").each(function () { 8 let elm = $(this); 9 let options = elm.data("swiper-options"); 10 let thmSwiperSlider = new Swiper(elm, options); 11 }); 12 } 13 } 14 15 function thmOwlInit() { 16 // owl slider 17 18 if ($(".thm-owl__carousel").length) { 19 $(".thm-owl__carousel").each(function () { 20 let elm = $(this); 21 let options = elm.data("owl-options"); 22 let thmOwlCarousel = elm.owlCarousel(options); 23 }); 24 } 25 26 if ($(".thm-owl__carousel--custom-nav").length) { 27 $(".thm-owl__carousel--custom-nav").each(function () { 28 let elm = $(this); 29 let owlNavPrev = elm.data("owl-nav-prev"); 30 let owlNavNext = elm.data("owl-nav-next"); 31 $(owlNavPrev).on("click", function (e) { 32 elm.trigger("prev.owl.carousel"); 33 e.preventDefault(); 34 }); 35 36 $(owlNavNext).on("click", function (e) { 37 elm.trigger("next.owl.carousel"); 38 e.preventDefault(); 39 }); 40 }); 41 } 42 } 43 44 // Price Filter 45 function priceFilter() { 46 if ($(".price-ranger").length) { 47 $(".price-ranger #slider-range").slider({ 48 range: true, 49 min: 50, 50 max: 500, 51 values: [11, 300], 52 slide: function (event, ui) { 53 $(".price-ranger .ranger-min-max-block .min").val("$" + ui.values[0]); 54 $(".price-ranger .ranger-min-max-block .max").val("$" + ui.values[1]); 55 }, 56 }); 57 $(".price-ranger .ranger-min-max-block .min").val( 58 "$" + $(".price-ranger #slider-range").slider("values", 0) 59 ); 60 $(".price-ranger .ranger-min-max-block .max").val( 61 "$" + $(".price-ranger #slider-range").slider("values", 1) 62 ); 63 } 64 } 65 66 // Cart Touch Spin 67 if ($(".quantity-spinner").length) { 68 $("input.quantity-spinner").TouchSpin({ 69 verticalbuttons: true, 70 }); 71 } 72 73 // custom coursor 74 if ($(".custom-cursor").length) { 75 var cursor = document.querySelector(".custom-cursor__cursor"); 76 var cursorinner = document.querySelector(".custom-cursor__cursor-two"); 77 var a = document.querySelectorAll("a"); 78 79 document.addEventListener("mousemove", function (e) { 80 var x = e.clientX; 81 var y = e.clientY; 82 cursor.style.transform = `translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`; 83 }); 84 85 document.addEventListener("mousemove", function (e) { 86 var x = e.clientX; 87 var y = e.clientY; 88 cursorinner.style.left = x + "px"; 89 cursorinner.style.top = y + "px"; 90 }); 91 92 document.addEventListener("mousedown", function () { 93 cursor.classList.add("click"); 94 cursorinner.classList.add("custom-cursor__innerhover"); 95 }); 96 97 document.addEventListener("mouseup", function () { 98 cursor.classList.remove("click"); 99 cursorinner.classList.remove("custom-cursor__innerhover"); 100 }); 101 102 a.forEach((item) => { 103 item.addEventListener("mouseover", () => { 104 cursor.classList.add("custom-cursor__hover"); 105 }); 106 item.addEventListener("mouseleave", () => { 107 cursor.classList.remove("custom-cursor__hover"); 108 }); 109 }); 110 } 111 112 if ($(".listing-details__contact-info-phone").length) { 113 $(".listing-details__contact-info-phone").on("click", function (e) { 114 e.preventDefault(); 115 var textElement = $(this).find(".text h5"); 116 var mainText = textElement.data("number"); 117 var toggleText = textElement.data("toggle-number"); 118 if (textElement.text() == mainText) { 119 textElement.text(toggleText); 120 } else { 121 textElement.text(mainText); 122 } 123 }); 124 } 125 126 if ($(".listing-top__map-show-hide").length) { 127 $(".listing-top__map-show-hide").on("click", function () { 128 $(this).toggleClass("hidden"); 129 var textElement = $(this).find(".listing-top__map-show-hide-text span"); 130 if (textElement.text() == textElement.data("text")) { 131 textElement.text(textElement.data("toggle-text")); 132 } else { 133 textElement.text(textElement.data("text")); 134 } 135 $(".listing__map").toggleClass("hidden"); 136 $(".listing__content").toggleClass("hidden"); 137 });
138 } 139 140 if ($("#datepicker").length) { 141 $("#datepicker").datepicker(); 142 } 143 144 if ($("#datepicker2").length) { 145 $("#datepicker2").datepicker(); 146 } 147 148 if ($("#datepicker-inline").length) { 149 $("#datepicker-inline").datepicker(); 150 } 151 152 $('input[name="time"]').ptTimeSelect(); 153 154 if ($(".banner-bg-slide").length) { 155 $(".banner-bg-slide").each(function () { 156 var Self = $(this); 157 var bgSlideOptions = Self.data("options"); 158 var bannerTwoSlides = Self.vegas(bgSlideOptions); 159 }); 160 } 161 162 //Pricing Tabs 163 if ($(".pricing-tabs").length) { 164 $(".pricing-tabs .tab-btns .tab-btn").on("click", function (e) { 165 e.preventDefault(); 166 var target = $($(this).attr("data-tab")); 167 168 if ($(target).hasClass("actve-tab")) { 169 return false; 170 } else { 171 $(".pricing-tabs .tab-btns .tab-btn").removeClass("active-btn"); 172 $(this).addClass("active-btn"); 173 $(".pricing-tabs .pr-content .pr-tab").removeClass("active-tab"); 174 $(target).addClass("active-tab"); 175 } 176 }); 177 } 178 179 // Type Effect 180 if ($(".typed-effect").length) { 181 $(".typed-effect").each(function () { 182 var typedStrings = $(this).data("strings"); 183 var typedTag = $(this).attr("id"); 184 var typed = new Typed("#" + typedTag, { 185 typeSpeed: 100, 186 backSpeed: 100, 187 fadeOut: true, 188 loop: true, 189 strings: typedStrings.split(","), 190 }); 191 }); 192 } 193 194 // Popular Causes Progress Bar 195 if ($(".count-bar").length) { 196 $(".count-bar").appear( 197 function () { 198 var el = $(this); 199 var percent = el.data("percent"); 200 $(el).css("width", percent).addClass("counted"); 201 }, 202 { 203 accY: -50, 204 } 205 ); 206 } 207 208 //Progress Bar / Levels 209 if ($(".progress-levels .progress-box .bar-fill").length) { 210 $(".progress-box .bar-fill").each( 211 function () { 212 $(".progress-box .bar-fill").appear(function () { 213 var progressWidth = $(this).attr("data-percent"); 214 $(this).css("width", progressWidth + "%"); 215 }); 216 }, 217 { 218 accY: 0, 219 } 220 ); 221 } 222 223 //Fact Counter + Text Count 224 if ($(".count-box").length) { 225 $(".count-box").appear( 226 function () { 227 var $t = $(this), 228 n = $t.find(".count-text").attr("data-stop"), 229 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 230 231 if (!$t.hasClass("counted")) { 232 $t.addClass("counted"); 233 $({ 234 countNum: $t.find(".count-text").text(), 235 }).animate( 236 { 237 countNum: n, 238 }, 239 { 240 duration: r, 241 easing: "linear", 242 step: function () { 243 $t.find(".count-text").text(Math.floor(this.countNum)); 244 }, 245 complete: function () { 246 $t.find(".count-text").text(this.countNum); 247 }, 248 } 249 ); 250 } 251 }, 252 { 253 accY: 0, 254 } 255 ); 256 } 257 258 // Accrodion 259 if ($(".accrodion-grp").length) { 260 var accrodionGrp = $(".accrodion-grp"); 261 accrodionGrp.each(function () { 262 var accrodionName = $(this).data("grp-name"); 263 var Self = $(this); 264 var accordion = Self.find(".accrodion"); 265 Self.addClass(accrodionName); 266 Self.find(".accrodion .accrodion-content").hide(); 267 Self.find(".accrodion.active").find(".accrodion-content").show(); 268 accordion.each(function () { 269 $(this) 270 .find(".accrodion-title") 271 .on("click", function () { 272 if ($(this).parent().hasClass("active") === false) { 273 $(".accrodion-grp." + accrodionName) 274 .find(".accrodion") 275 .removeClass("active"); 276 $(".accrodion-grp." + accrodionName) 277 .find(".accrodion") 278 .find(".accrodion-content") 279 .slideUp(); 280 $(this).parent().addClass("active"); 281 $(this).parent().find(".accrodion-content").slideDown(); 282 } 283 }); 284 }); 285 });
286 } 287 288 if ($(".scroll-to-target").length) { 289 $(".scroll-to-target").on("click", function () { 290 var target = $(this).attr("data-target"); 291 // animate 292 $("html, body").animate( 293 { 294 scrollTop: $(target).offset().top, 295 }, 296 1000 297 ); 298 299 return false; 300 }); 301 } 302 303 if ($(".contact-form-validated").length) { 304 $(".contact-form-validated").validate({ 305 // initialize the plugin 306 rules: { 307 name: { 308 required: true, 309 }, 310 email: { 311 required: true, 312 email: true, 313 }, 314 message: { 315 required: true, 316 }, 317 subject: { 318 required: true, 319 }, 320 }, 321 submitHandler: function (form) { 322 // sending value with ajax request 323 $.post( 324 $(form).attr("action"), 325 $(form).serialize(), 326 function (response) { 327 $(form).parent().find(".result").append(response); 328 $(form).find('input[type="text"]').val(""); 329 $(form).find('input[type="email"]').val(""); 330 $(form).find("textarea").val(""); 331 } 332 ); 333 return false; 334 }, 335 }); 336 } 337 338 // mailchimp form 339 if ($(".mc-form").length) { 340 $(".mc-form").each(function () { 341 var Self = $(this); 342 var mcURL = Self.data("url"); 343 var mcResp = Self.parent().find(".mc-form__response"); 344 345 Self.ajaxChimp({ 346 url: mcURL, 347 callback: function (resp) { 348 // appending response 349 mcResp.append(function () { 350 return '<p class="mc-message">' + resp.msg + "</p>"; 351 }); 352 // making things based on response 353 if (resp.result === "success") { 354 // Do stuff 355 Self.removeClass("errored").addClass("successed"); 356 mcResp.removeClass("errored").addClass("successed"); 357 Self.find("input").val(""); 358 359 mcResp.find("p").fadeOut(10000); 360 } 361 if (resp.result === "error") { 362 Self.removeClass("successed").addClass("errored"); 363 mcResp.removeClass("successed").addClass("errored"); 364 Self.find("input").val(""); 365 366 mcResp.find("p").fadeOut(10000); 367 } 368 }, 369 }); 370 }); 371 } 372 373 if ($(".video-popup").length) { 374 $(".video-popup").magnificPopup({ 375 type: "iframe", 376 mainClass: "mfp-fade", 377 removalDelay: 160, 378 preloader: true, 379 380 fixedContentPos: false, 381 }); 382 } 383 384 if ($(".img-popup").length) { 385 var groups = {}; 386 $(".img-popup").each(function () { 387 var id = parseInt($(this).attr("data-group"), 10); 388 389 if (!groups[id]) { 390 groups[id] = []; 391 } 392 393 groups[id].push(this); 394 }); 395 396 $.each(groups, function () { 397 $(this).magnificPopup({ 398 type: "image", 399 closeOnContentClick: true, 400 closeBtnInside: false, 401 gallery: { 402 enabled: true, 403 }, 404 }); 405 }); 406 } 407 408 function dynamicCurrentMenuClass(selector) { 409 let FileName = window.location.href.split("/").reverse()[0]; 410 411 selector.find("li").each(function () { 412 let anchor = $(this).find("a"); 413 if ($(anchor).attr("href") == FileName) { 414 $(this).addClass("current"); 415 } 416 }); 417 // if any li has .current elmnt add class 418 selector.children("li").each(function () { 419 if ($(this).find(".current").length) { 420 $(this).addClass("current"); 421 } 422 }); 423 } 424 425 if ($(".main-menu__list").length) { 426 // dynamic current class 427 let mainNavUL = $(".main-menu__list"); 428 dynamicCurrentMenuClass(mainNavUL); 429 } 430 if ($(".service-details__sidebar-service-list").length) { 431 // dynamic current class 432 let mainNavUL = $(".service-details__sidebar-service-list"); 433 dynamicCurrentMenuClass(mainNavUL); 434 } 435 436 if ($(".main-menu__list").length && $(".mobile-nav__container").length) { 437 let navContent = document.querySelector(".main-menu__list").outerHTML; 438 let mobileNavContainer = document.querySelector(".mobile-nav__container"); 439 mobileNavContainer.innerHTML = navContent; 440 } 441 if ($(".sticky-header__content").length) { 442 let navContent = document.querySelector(".main-menu").innerHTML; 443 let mobileNavContainer = document.querySelector(".sticky-header__content"); 444 mobileNavContainer.innerHTML = navContent; 445 } 446 447 if ($(".mobile-nav__container .main-menu__list").length) { 448 let dropdownAnchor = $( 449 ".mobile-nav__container .main-menu__list .dropdown > a" 450 ); 451 dropdownAnchor.each(function () { 452 let self = $(this); 453 let toggleBtn = document.createElement("BUTTON"); 454 toggleBtn.setAttribute("aria-label", "dropdown toggler"); 455 toggleBtn.innerHTML = "<i class='fa fa-angle-down'></i>"; 456 self.append(function () { 457 return toggleBtn; 458 }); 459 self.find("button").on("click", function (e) { 460 e.preventDefault(); 461 let self = $(this); 462 self.toggleClass("expanded"); 463 self.parent().toggleClass("expanded"); 464 self.parent().parent().children("ul").slideToggle(); 465 }); 466 });
467 } 468 469 if ($(".mobile-nav__toggler").length) { 470 $(".mobile-nav__toggler").on("click", function (e) { 471 e.preventDefault(); 472 $(".mobile-nav__wrapper").toggleClass("expanded"); 473 $("body").toggleClass("locked"); 474 }); 475 } 476 477 if ($(".search-toggler").length) { 478 $(".search-toggler").on("click", function (e) { 479 e.preventDefault(); 480 $(".search-popup").toggleClass("active"); 481 $(".mobile-nav__wrapper").removeClass("expanded"); 482 $("body").toggleClass("locked"); 483 }); 484 } 485 486 if ($(".odometer").length) { 487 var odo = $(".odometer"); 488 odo.each(function () { 489 $(this).appear(function () { 490 var countNumber = $(this).attr("data-count"); 491 $(this).html(countNumber); 492 }); 493 }); 494 } 495 496 if ($(".dynamic-year").length) { 497 let date = new Date(); 498 $(".dynamic-year").html(date.getFullYear()); 499 } 500 501 if ($(".wow").length) { 502 var wow = new WOW({ 503 boxClass: "wow", // animated element css class (default is wow) 504 animateClass: "animated", // animation css class (default is animated) 505 mobile: true, // trigger animations on mobile devices (default is true) 506 live: true, // act on asynchronously loaded content (default is true) 507 }); 508 wow.init(); 509 } 510 511 if ($("#donate-amount__predefined").length) { 512 let donateInput = $("#donate-amount"); 513 $("#donate-amount__predefined") 514 .find("li") 515 .on("click", function (e) { 516 e.preventDefault(); 517 let amount = $(this).find("a").text(); 518 donateInput.val(amount); 519 $("#donate-amount__predefined").find("li").removeClass("active"); 520 $(this).addClass("active"); 521 }); 522 } 523 524 if ($(".thm-accordion").length) { 525 let accordionWrapper = $(".thm-accordion"); 526 accordionWrapper.each(function () { 527 let $this = $(this); 528 let accordionID = $this.attr("id"); 529 let accordionTitle = $this.find(".thm-accordion__title"); 530 $this.addClass(accordionID); 531 // default hide 532 let mainAccordionContent = $this.find(".thm-accordion__content").hide(); 533 $this.find(".active-item .thm-accordion__content").show(); 534 // on title click 535 accordionTitle.on("click", function (e) { 536 e.preventDefault(); 537 let $this = $(this); 538 let accordionItem = $(this).parent(); 539 if (false === accordionItem.hasClass("active-item")) { 540 $("#" + accordionID) 541 .find(".thm-accordion__item") 542 .removeClass("active-item"); 543 accordionItem.addClass("active-item"); 544 mainAccordionContent.slideUp(); 545 accordionItem.find(".thm-accordion__content").slideDown(); 546 } 547 }); 548 }); 549 } 550 551 $(".add").on("click", function () { 552 if ($(this).prev().val() < 999) { 553 $(this) 554 .prev() 555 .val(+$(this).prev().val() + 1); 556 } 557 }); 558 $(".sub").on("click", function () { 559 if ($(this).next().val() > 1) { 560 if ($(this).next().val() > 1) 561 $(this) 562 .next() 563 .val(+$(this).next().val() - 1); 564 } 565 }); 566 567 if ($(".tabs-box").length) { 568 $(".tabs-box .tab-buttons .tab-btn").on("click", function (e) { 569 e.preventDefault(); 570 var target = $($(this).attr("data-tab")); 571 572 if ($(target).is(":visible")) { 573 return false; 574 } else { 575 target 576 .parents(".tabs-box") 577 .find(".tab-buttons") 578 .find(".tab-btn") 579 .removeClass("active-btn"); 580 $(this).addClass("active-btn"); 581 target 582 .parents(".tabs-box") 583 .find(".tabs-content") 584 .find(".tab") 585 .fadeOut(0); 586 target 587 .parents(".tabs-box") 588 .find(".tabs-content") 589 .find(".tab") 590 .removeClass("active-tab"); 591 $(target).fadeIn(300); 592 $(target).addClass("active-tab"); 593 } 594 }); 595 } 596 597 if ($(".range-slider-price").length) { 598 var priceRange = document.getElementById("range-slider-price"); 599 600 noUiSlider.create(priceRange, { 601 start: [30, 150], 602 limit: 200, 603 behaviour: "drag", 604 connect: true, 605 range: { 606 min: 10, 607 max: 200, 608 }, 609 });
610 611 var limitFieldMin = document.getElementById("min-value-rangeslider"); 612 var limitFieldMax = document.getElementById("max-value-rangeslider"); 613 614 priceRange.noUiSlider.on("update", function (values, handle) { 615 (handle ? $(limitFieldMax) : $(limitFieldMin)).text(values[handle]); 616 }); 617 } 618 619 function thmTinyInit() { 620 // tiny slider 621 const tinyElm = document.querySelectorAll(".thm-tiny__slider"); 622 tinyElm.forEach(function (tinyElm) { 623 const tinyOptions = JSON.parse(tinyElm.dataset.tinyOptions); 624 let thmTinySlider = tns(tinyOptions); 625 }); 626 } 627 628 if ($("#project-one__thumb").length) { 629 let testimonialsThumb = new Swiper("#project-one__thumb", { 630 slidesPerView: 4, 631 spaceBetween: 16, 632 speed: 1400, 633 watchSlidesVisibility: true, 634 watchSlidesProgress: true, 635 loop: true, 636 autoplay: { 637 delay: 5000, 638 }, 639 }); 640 641 let testimonialsCarousel = new Swiper("#project-one__carousel", { 642 observer: true, 643 observeParents: true, 644 loop: true, 645 speed: 1400, 646 mousewheel: true, 647 slidesPerView: 1, 648 spaceBetween: 72, 649 autoplay: { 650 delay: 5000, 651 }, 652 thumbs: { 653 swiper: testimonialsThumb, 654 }, 655 pagination: { 656 el: "#testimonials-one__carousel-pagination", 657 type: "bullets", 658 clickable: true, 659 }, 660 661 navigation: { 662 nextEl: "#project-one__swiper-button-next", 663 prevEl: "#project-one__swiper-button-prev", 664 }, 665 }); 666 } 667 668 // ===Portfolio=== 669 function projectMasonaryLayout() { 670 if ($(".masonary-layout").length) { 671 $(".masonary-layout").isotope({ 672 layoutMode: "masonry", 673 }); 674 } 675 if ($(".post-filter").length) { 676 $(".post-filter li") 677 .children(".filter-text") 678 .on("click", function () { 679 var Self = $(this); 680 var selector = Self.parent().attr("data-filter"); 681 $(".post-filter li").removeClass("active"); 682 Self.parent().addClass("active"); 683 $(".filter-layout").isotope({ 684 filter: selector, 685 animationOptions: { 686 duration: 500, 687 easing: "linear", 688 queue: false, 689 }, 690 }); 691 return false; 692 }); 693 } 694 695 if ($(".post-filter.has-dynamic-filters-counter").length) { 696 // var allItem = $('.single-filter-item').length; 697 var activeFilterItem = $(".post-filter.has-dynamic-filters-counter").find( 698 "li" 699 ); 700 activeFilterItem.each(function () { 701 var filterElement = $(this).data("filter"); 702 var count = $(".filter-layout").find(filterElement).length; 703 $(this) 704 .children(".filter-text") 705 .append('<span class="count">' + count + "</span>"); 706 }); 707 } 708 } 709 710 // ===Checkout Payment=== 711 if ($(".checkout__payment__title").length) { 712 $(".checkout__payment__item").find(".checkout__payment__content").hide(); 713 $(".checkout__payment__item--active") 714 .find(".checkout__payment__content") 715 .show(); 716 717 $(".checkout__payment__title").on("click", function (e) { 718 e.preventDefault(); 719 720 $(this) 721 .parents(".checkout__payment") 722 .find(".checkout__payment__item") 723 .removeClass("checkout__payment__item--active"); 724 $(this) 725 .parents(".checkout__payment") 726 .find(".checkout__payment__content") 727 .slideUp(); 728 729 $(this).parent().addClass("checkout__payment__item--active"); 730 $(this).parent().find(".checkout__payment__content").slideDown(); 731 }); 732 } 733 734 //Single Vertical Carousel 735 if ($(".single-vertical-carousel").length) { 736 $(".single-vertical-carousel").slick({ 737 dots: true, 738 autoplay: false, 739 loop: true, 740 autoplaySpeed: 5000, 741 infinite: true, 742 responsive: true, 743 slidesToShow: 2, 744 vertical: true, 745 slidesToScroll: 1, 746 prevArrow: 747 "<div class='prev-btn'><span class='fa fa-angle-up'></span></div>", 748 nextArrow: 749 "<div class='next-btn'><span class='fa fa-angle-down'></span></div>", 750 });
751 } 752 753 if ($(".circle-progress").length) { 754 $(".circle-progress").appear(function () { 755 let circleProgress = $(".circle-progress"); 756 circleProgress.each(function () { 757 let progress = $(this); 758 let progressOptions = progress.data("options"); 759 progress.circleProgress(progressOptions); 760 }); 761 }); 762 } 763 764 function SmoothMenuScroll() { 765 var anchor = $(".scrollToLink"); 766 if (anchor.length) { 767 anchor.children("a").bind("click", function (event) { 768 if ($(window).scrollTop() > 10) { 769 var headerH = "90"; 770 } else { 771 var headerH = "90"; 772 } 773 var target = $(this); 774 $("html, body") 775 .stop() 776 .animate( 777 { 778 scrollTop: $(target.attr("href")).offset().top - headerH + "px", 779 }, 780 1200, 781 "easeInOutExpo" 782 ); 783 anchor.removeClass("current"); 784 anchor.removeClass("current-menu-ancestor"); 785 anchor.removeClass("current_page_item"); 786 anchor.removeClass("current-menu-parent"); 787 target.parent().addClass("current"); 788 event.preventDefault(); 789 }); 790 } 791 } 792 SmoothMenuScroll(); 793 794 function OnePageMenuScroll() { 795 var windscroll = $(window).scrollTop(); 796 if (windscroll >= 117) { 797 var menuAnchor = $(".one-page-scroll-menu .scrollToLink").children("a"); 798 menuAnchor.each(function () { 799 var sections = $(this).attr("href"); 800 $(sections).each(function () { 801 if ($(this).offset().top <= windscroll + 100) { 802 var Sectionid = $(sections).attr("id"); 803 $(".one-page-scroll-menu").find("li").removeClass("current"); 804 $(".one-page-scroll-menu") 805 .find("li") 806 .removeClass("current-menu-ancestor"); 807 $(".one-page-scroll-menu") 808 .find("li") 809 .removeClass("current_page_item"); 810 $(".one-page-scroll-menu") 811 .find("li") 812 .removeClass("current-menu-parent"); 813 $(".one-page-scroll-menu") 814 .find("a[href*=\\#" + Sectionid + "]") 815 .parent() 816 .addClass("current"); 817 } 818 }); 819 }); 820 } else { 821 $(".one-page-scroll-menu li.current").removeClass("current"); 822 $(".one-page-scroll-menu li:first").addClass("current"); 823 } 824 } 825 826 // window load event 827 828 $(window).on("load", function () { 829 if ($(".preloader").length) { 830 $(".preloader").fadeOut(); 831 } 832 thmSwiperInit(); 833 thmOwlInit(); 834 projectMasonaryLayout(); 835 priceFilter(); 836 837 $(window).click(function () { 838 //Hide the menus if visible 839 $("#menu-overlay").addClass("hidden"); 840 $("body").removeClass("locked"); 841 }); 842 843 $("#menu-overlay").click(function (event) { 844 event.stopPropagation(); 845 }); 846 847 $(".menu-button").each(function () { 848 $(this).on("click", function (event) { 849 event.stopPropagation(); 850 $("#menu-overlay").removeClass("hidden"); 851 $("body").addClass("locked"); 852 }); 853 }); 854 855 if ($("#close-menu-button")) { 856 $("#close-menu-button").on("click", function () { 857 $("#menu-overlay").addClass("hidden"); 858 $("body").removeClass("locked"); 859 }); 860 } 861 862 if ($(".curved-circle--item").length) { 863 $(".curved-circle--item").each(function () { 864 let elm = $(this); 865 let options = elm.data("circle-options"); 866 elm.circleType(options); 867 }); 868 } 869 870 //Jquery Spinner / Quantity Spinner 871 if ($(".quantity-spinner").length) { 872 $("input.quantity-spinner").TouchSpin({ 873 verticalbuttons: true, 874 }); 875 } 876 877 if ($(".post-filter").length) { 878 var postFilterList = $(".post-filter li"); 879 // for first init 880 $(".filter-layout").isotope({ 881 filter: ".filter-item", 882 animationOptions: { 883 duration: 500, 884 easing: "linear", 885 queue: false, 886 }, 887 }); 888 // on click filter links 889 postFilterList.on("click", function () { 890 var Self = $(this); 891 var selector = Self.attr("data-filter"); 892 postFilterList.removeClass("active"); 893 Self.addClass("active"); 894 895 $(".filter-layout").isotope({ 896 filter: selector, 897 animationOptions: { 898 duration: 500, 899 easing: "linear", 900 queue: false, 901 }, 902 }); 903 return false; 904 }); 905 } 906 907 if ($(".post-filter.has-dynamic-filter-counter").length) { 908 // var allItem = $('.single-filter-item').length; 909 910 var activeFilterItem = $(".post-filter.has-dynamic-filter-counter").find( 911 "li" 912 ); 913 914 activeFilterItem.each(function () { 915 var filterElement = $(this).data("filter"); 916 var count = $(".filter-layout").find(filterElement).length; 917 $(this).append("<sup>[" + count + "]</sup>"); 918 }); 919 } 920 921 //Testimonials Two 922 if ($(".listing-details__gallery .bxslider").length) { 923 $(".listing-details__gallery .bxslider").bxSlider({ 924 nextSelector: ".listing-details__gallery #slider-next", 925 prevSelector: ".listing-details__gallery #slider-prev", 926 nextText: '<i class="icon-right-arrow1"></i>', 927 prevText: '<i class="icon-right-arrow1 icon-prev"></i>', 928 mode: "horizontal", 929 auto: "true", 930 speed: "1000", 931 pagerCustom: 932 ".listing-details__gallery .slider-pager .listing-details__thumb-box", 933 }); 934 } 935 936 if ($("#testimonials-one__thumb").length) { 937 let testimonialsThumb = new Swiper("#testimonials-one__thumb", { 938 slidesPerView: 4, 939 spaceBetween: 0, 940 speed: 1400, 941 watchSlidesVisibility: true, 942 watchSlidesProgress: true, 943 loop: true, 944 autoplay: { 945 delay: 5000, 946 }, 947 }); 948
949 let testimonialsCarousel = new Swiper("#testimonials-one__carousel", { 950 observer: true, 951 observeParents: true, 952 speed: 1400, 953 mousewheel: true, 954 slidesPerView: 1, 955 autoplay: { 956 delay: 5000, 957 }, 958 thumbs: { 959 swiper: testimonialsThumb, 960 }, 961 pagination: { 962 el: "#testimonials-one__carousel-pagination", 963 type: "bullets", 964 clickable: true, 965 }, 966 }); 967 } 968 }); 969 970 // window scroll event 971 972 $(window).on("scroll", function () { 973 if ($(".stricked-menu").length) { 974 var headerScrollPos = 130; 975 var stricky = $(".stricked-menu"); 976 if ($(window).scrollTop() > headerScrollPos) { 977 stricky.addClass("stricky-fixed"); 978 } else if ($(this).scrollTop() <= headerScrollPos) { 979 stricky.removeClass("stricky-fixed"); 980 } 981 } 982 if ($(".scroll-to-top").length) { 983 var strickyScrollPos = 100; 984 if ($(window).scrollTop() > strickyScrollPos) { 985 $(".scroll-to-top").fadeIn(500); 986 } else if ($(this).scrollTop() <= strickyScrollPos) { 987 $(".scroll-to-top").fadeOut(500); 988 } 989 } 990 991 OnePageMenuScroll(); 992 }); 993 994 if ($(".before-after-twentytwenty").length) { 995 $(".before-after-twentytwenty").each(function () { 996 var Self = $(this); 997 var objName = Self.attr("id"); 998 $("#" + objName).twentytwenty(); 999 1000 // hack for bs tab 1001 $(document).on("shown.bs.tab", 'a[data-toggle="tab"]', function (e) { 1002 var paneTarget = $(e.target).attr("data-target"); 1003 var $thePane = $(".tab-pane" + paneTarget); 1004 var twentyTwentyContainer = "#" + objName; 1005 var twentyTwentyHeight = $thePane.find(twentyTwentyContainer).height(); 1006 if (0 === twentyTwentyHeight) { 1007 $thePane.find(twentyTwentyContainer).trigger("resize"); 1008 } 1009 }); 1010 }); 1011 } 1012 1013 $("select:not(.ignore)").niceSelect(); 1014})(jQuery); 1015 1016 1017function shareOnFacebook(url){ 1018 const navUrl = 'https://www.facebook.com/sharer/sharer.php?u=' + url; 1019 window.open(navUrl , '_blank'); 1020} 1021 1022function shareOnTwitter(url) { 1023 const navUrl = 1024 'https://twitter.com/intent/tweet?text=' + 1025 url; 1026 window.open(navUrl, '_blank'); 1027}
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.