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