1(function($) { 2 3 "use strict"; 4 5 //Hide Loading Box (Preloader) 6 function handlePreloader() { 7 if($('.loader-wrap').length){ 8 $('.loader-wrap').delay(1000).fadeOut(500); 9 } 10 } 11 12 if ($(".preloader-close").length) { 13 $(".preloader-close").on("click", function(){ 14 $('.loader-wrap').delay(200).fadeOut(500); 15 }) 16 } 17 18 //Update Header Style and Scroll to Top 19 function headerStyle() { 20 if($('.main-header').length){ 21 var windowpos = $(window).scrollTop(); 22 var siteHeader = $('.main-header'); 23 var scrollLink = $('.scroll-top'); 24 if (windowpos >= 110) { 25 siteHeader.addClass('fixed-header'); 26 scrollLink.addClass('open'); 27 } else { 28 siteHeader.removeClass('fixed-header'); 29 scrollLink.removeClass('open'); 30 } 31 } 32 } 33 34 headerStyle(); 35 36 37 //Submenu Dropdown Toggle 38 if($('.main-header li.dropdown ul').length){ 39 $('.main-header .navigation li.dropdown').append('<div class="dropdown-btn"><span class="fas fa-angle-down"></span></div>'); 40 41 } 42 43 //Mobile Nav Hide Show 44 if($('.mobile-menu').length){ 45 46 $('.mobile-menu .menu-box').mCustomScrollbar(); 47 48 var mobileMenuContent = $('.main-header .menu-area .main-menu').html(); 49 $('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent); 50 $('.sticky-header .main-menu').append(mobileMenuContent); 51 52 //Dropdown Button 53 $('.mobile-menu li.dropdown .dropdown-btn').on('click', function() { 54 $(this).toggleClass('open'); 55 $(this).prev('ul').slideToggle(500); 56 }); 57 //Dropdown Button 58 $('.mobile-menu li.dropdown .dropdown-btn').on('click', function() { 59 $(this).prev('.megamenu').slideToggle(900); 60 }); 61 //Menu Toggle Btn 62 $('.mobile-nav-toggler').on('click', function() { 63 $('body').addClass('mobile-menu-visible'); 64 }); 65 66 //Menu Toggle Btn 67 $('.mobile-menu .menu-backdrop,.mobile-menu .close-btn').on('click', function() { 68 $('body').removeClass('mobile-menu-visible'); 69 }); 70 } 71 72 73 // Scroll to a Specific Div 74 if($('.scroll-to-target').length){ 75 $(".scroll-to-target").on('click', function() { 76 var target = $(this).attr('data-target'); 77 // animate 78 $('html, body').animate({ 79 scrollTop: $(target).offset().top 80 }, 1000); 81 82 }); 83 } 84 85 // Elements Animation 86 if($('.wow').length){ 87 var wow = new WOW({ 88 mobile: false 89 }); 90 wow.init(); 91 } 92 93 //Contact Form Validation 94 if($('#contact-form').length){ 95 $('#contact-form').validate({ 96 rules: { 97 username: { 98 required: true 99 }, 100 email: { 101 required: true, 102 email: true 103 }, 104 phone: { 105 required: true 106 }, 107 subject: { 108 required: true 109 }, 110 message: { 111 required: true 112 } 113 } 114 }); 115 } 116 117 //Fact Counter + Text Count 118 if($('.count-box').length){ 119 $('.count-box').appear(function(){ 120 121 var $t = $(this), 122 n = $t.find(".count-text").attr("data-stop"), 123 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 124 125 if (!$t.hasClass("counted")) { 126 $t.addClass("counted"); 127 $({ 128 countNum: $t.find(".count-text").text() 129 }).animate({ 130 countNum: n 131 }, { 132 duration: r, 133 easing: "linear", 134 step: function() { 135 $t.find(".count-text").text(Math.floor(this.countNum)); 136 }, 137 complete: function() { 138 $t.find(".count-text").text(this.countNum); 139 } 140 }); 141 } 142 143 },{accY: 0}); 144 } 145 146 147 //LightBox / Fancybox 148 if($('.lightbox-image').length) { 149 $('.lightbox-image').fancybox({ 150 openEffect : 'fade', 151 closeEffect : 'fade', 152 helpers : { 153 media : {} 154 } 155 }); 156 } 157 158 159 //Tabs Box 160 if($('.tabs-box').length){ 161 $('.tabs-box .tab-buttons .tab-btn').on('click', function(e) { 162 e.preventDefault(); 163 var target = $($(this).attr('data-tab')); 164 165 if ($(target).is(':visible')){ 166 return false; 167 }else{ 168 target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn'); 169 $(this).addClass('active-btn'); 170 target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0); 171 target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab'); 172 $(target).fadeIn(300); 173 $(target).addClass('active-tab'); 174 } 175 }); 176 } 177 178 179 //Pricing Tabs 180 if($('.pricing-tabs').length){ 181 $('.pricing-tabs .tab-btns .tab-btn').on('click', function(e) { 182 e.preventDefault(); 183 var target = $($(this).attr('data-tab')); 184 185 if ($(target).hasClass('actve-tab')){ 186 return false; 187 }else{ 188 $('.pricing-tabs .tab-btns .tab-btn').removeClass('active-btn'); 189 $(this).addClass('active-btn'); 190 $('.pricing-tabs .pr-content .pr-tab').removeClass('active-tab'); 191 $(target).addClass('active-tab'); 192 } 193 }); 194 } 195 196 197 198 //Accordion Box 199 if($('.accordion-box').length){ 200 $(".accordion-box").on('click', '.acc-btn', function() { 201 202 var outerBox = $(this).parents('.accordion-box'); 203 var target = $(this).parents('.accordion'); 204 205 if($(this).hasClass('active')!==true){ 206 $(outerBox).find('.accordion .acc-btn').removeClass('active'); 207 } 208 209 if ($(this).next('.acc-content').is(':visible')){ 210 return false; 211 }else{ 212 $(this).addClass('active'); 213 $(outerBox).children('.accordion').removeClass('active-block'); 214 $(outerBox).find('.accordion').children('.acc-content').slideUp(300); 215 target.addClass('active-block'); 216 $(this).next('.acc-content').slideDown(300); 217 } 218 }); 219 } 220 221 222 // banner-carousel 223 if ($('.banner-carousel').length) { 224 $('.banner-carousel').owlCarousel({ 225 loop:true, 226 margin:0, 227 nav:true, 228 animateOut: 'fadeOut', 229 animateIn: 'fadeIn', 230 active: true, 231 smartSpeed: 1000, 232 autoplay: 6000, 233 navText: [ '<span></span>', '<span></span>' ], 234 responsive:{ 235 0:{ 236 items:1 237 }, 238 600:{ 239 items:1 240 }, 241 800:{ 242 items:1 243 }, 244 1024:{ 245 items:1 246 } 247 } 248 }); 249 } 250 251 252 // single-item-carousel 253 if ($('.single-item-carousel').length) { 254 $('.single-item-carousel').owlCarousel({ 255 loop:true, 256 margin:30, 257 nav:true, 258 smartSpeed: 500, 259 autoplay: 1000, 260 navText: [ '<span class="far fa-long-arrow-left"></span>', '<span class="far fa-long-arrow-right"></span>' ], 261 responsive:{ 262 0:{ 263 items:1 264 }, 265 480:{ 266 items:1 267 }, 268 600:{ 269 items:1 270 }, 271 800:{ 272 items:1 273 }, 274 1200:{ 275 items:1 276 } 277 278 } 279 }); 280 } 281 282 283 //two-column-carousel 284 if ($('.two-column-carousel').length) { 285 $('.two-column-carousel').owlCarousel({ 286 loop:true, 287 margin:30, 288 nav:true, 289 smartSpeed: 500, 290 autoplay: 1000, 291 navText: [ '<span class="icon-4"></span>', '<span class="icon-4"></span>' ], 292 responsive:{ 293 0:{ 294 items:1 295 }, 296 480:{ 297 items:1 298 }, 299 600:{ 300 items:1 301 }, 302 800:{ 303 items:2 304 }, 305 1024:{ 306 items:2 307 } 308 } 309 }); 310 } 311 312 313 //three-item-carousel 314 if ($('.three-item-carousel').length) { 315 $('.three-item-carousel').owlCarousel({ 316 loop:true, 317 margin:30, 318 nav:true, 319 smartSpeed: 500, 320 autoplay: 1000, 321 navText: [ '<span class="fas fa-angle-left"></span>', '<span class="fas fa-angle-right"></span>' ], 322 responsive:{ 323 0:{ 324 items:1 325 }, 326 480:{ 327 items:1 328 }, 329 600:{ 330 items:2 331 }, 332 800:{ 333 items:2 334 }, 335 1024:{ 336 items:3 337 } 338 } 339 }); 340 } 341 342 343 //four-item-carousel 344 if ($('.four-item-carousel').length) { 345 $('.four-item-carousel').owlCarousel({ 346 loop:true, 347 margin:30, 348 nav:true, 349 smartSpeed: 500, 350 autoplay: 1000, 351 navText: [ '<span class="icon-4"></span>', '<span class="icon-4"></span>' ], 352 responsive:{ 353 0:{ 354 items:1 355 }, 356 480:{ 357 items:2 358 }, 359 600:{ 360 items:2 361 }, 362 800:{ 363 items:3 364 }, 365 1024:{ 366 items:4 367 } 368 } 369 }); 370 } 371 372 373 //five-item-carousel 374 if ($('.five-item-carousel').length) { 375 $('.five-item-carousel').owlCarousel({ 376 loop:true, 377 margin:30, 378 nav:true, 379 smartSpeed: 500, 380 autoplay: 1000, 381 navText: [ '<span class="fas fa-angle-left"></span>', '<span class="fas fa-angle-right"></span>' ], 382 responsive:{ 383 0:{ 384 items:1 385 }, 386 480:{ 387 items:2 388 }, 389 600:{ 390 items:3 391 }, 392 800:{ 393 items:4 394 }, 395 1024:{ 396 items:5 397 } 398 } 399 }); 400 } 401 402 //Sponsor logo carousel: 403 if ($('#client-sponsors-container').length) { 404 //Add Classes: 405 $('#client-sponsors-container .ce-inner').addClass("owl-carousel").addClass("owl-nav-none").addClass("owl-theme").addClass("owl-dots-none"); 406 //Initiate Owl Carousel: 407 $('#client-sponsors-container .ce-inner').owlCarousel({ 408 loop:true, 409 margin:55, 410 nav:true, 411 smartSpeed: 500, 412 autoplay: 1000, 413 navText: [ '<span class="fas fa-angle-left"></span>', '<span class="fas fa-angle-right"></span>' ], 414 responsive:{ 415 0:{ 416 items:1 417 }, 418 480:{ 419 items:2 420 }, 421 600:{ 422 items:3 423 }, 424 800:{ 425 items:4 426 }, 427 1024:{ 428 items:6 429 } 430 } 431 }); 432 } 433
434 //Ambassador carousel 435 if ($('.amba-carousel').length) { 436 437 $('.amba-carousel .ce-inner').addClass("owl-carousel").addClass("owl-theme").addClass("owl-dots-none"); 438 439 $('.amba-carousel .ce-inner').owlCarousel({ 440 loop:true, 441 margin:10, 442 nav:true, 443 navText: [ '<span class="fas fa-angle-left"></span>', '<span class="fas fa-angle-right"></span>' ], 444 autoplay: 1000, 445 smartSpeed: 500, 446 autoplayHoverPause: true, 447 responsive:{ 448 0:{ 449 items:1, 450 nav:false 451 }, 452 1024:{ 453 items:2, 454 nav:false 455 } 456 } 457 }); 458 } 459 460 if ($('.ambassador-carousel').length) { 461 $('.ambassador-carousel').owlCarousel({ 462 loop:true, 463 margin:10, 464 autoplay: 1000, 465 smartSpeed: 500, 466 autoplayHoverPause: true, 467 nav:false, 468 responsive:{ 469 0:{ 470 items:1, 471 nav:false 472 }, 473 1024:{ 474 items:2, 475 nav:false 476 } 477 } 478 }); 479 } 480 481 //project-carousel 482 if ($('.project-carousel').length) { 483 $('.project-carousel').owlCarousel({ 484 loop:true, 485 margin:0, 486 nav:true, 487 smartSpeed: 500, 488 autoplay: 1000, 489 navText: [ '<span class="icon-4"></span>', '<span class="icon-4"></span>' ], 490 responsive:{ 491 0:{ 492 items:1 493 }, 494 480:{ 495 items:2 496 }, 497 600:{ 498 items:2 499 }, 500 800:{ 501 items:3 502 }, 503 1024:{ 504 items:4 505 } 506 } 507 }); 508 } 509 510 511 //project-carousel-two 512 if ($('.project-carousel-two').length) { 513 $('.project-carousel-two').owlCarousel({ 514 loop:true, 515 margin:70, 516 nav:true, 517 smartSpeed: 500, 518 autoplay: 1000, 519 navText: [ '<span class="icon-4"></span>', '<span class="icon-4"></span>' ], 520 responsive:{ 521 0:{ 522 items:1 523 }, 524 480:{ 525 items:1 526 }, 527 600:{ 528 items:1 529 }, 530 800:{ 531 items:2 532 }, 533 1024:{ 534 items:2 535 } 536 } 537 }); 538 } 539 540 // project-carousel-three 541 if ($('.project-carousel-three').length) { 542 $('.project-carousel-three').owlCarousel({ 543 loop:true, 544 margin:180, 545 nav:true, 546 smartSpeed: 500, 547 autoplay: 1000, 548 navText: [ '<span class="far fa-long-arrow-left"></span>', '<span class="far fa-long-arrow-right"></span>' ], 549 responsive:{ 550 0:{ 551 items:1 552 }, 553 480:{ 554 items:1 555 }, 556 600:{ 557 items:1 558 }, 559 800:{ 560 items:1 561 }, 562 1200:{ 563 items:1 564 } 565 566 } 567 }); 568 } 569 570 571 //Client Testimonial Carousel 572 if ($('.client-project-carousel').length && $('.client-thumbs-carousel').length) { 573 574 var $sync3 = $(".client-project-carousel"), 575 $sync4 = $(".client-thumbs-carousel"), 576 flag = false, 577 duration = 500; 578 579 $sync3 580 .owlCarousel({ 581 loop:true, 582 items: 1, 583 margin: 0, 584 nav: true, 585 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 586 dots: false, 587 autoplay: true, 588 autoplayTimeout: 5000 589 }) 590 .on('changed.owl.carousel', function (e) { 591 if (!flag) { 592 flag = false; 593 $sync4.trigger('to.owl.carousel', [e.item.index, duration, true]); 594 flag = false; 595 } 596 }); 597 598 $sync4 599 .owlCarousel({ 600 loop:true, 601 margin:20, 602 items: 1, 603 nav: false, 604 navText: [ '<span class="icon fa fa-long-arrow-left"></span>', '<span class="icon fa fa-long-arrow-right"></span>' ], 605 dots: true, 606 center: false, 607 autoplay: true, 608 autoplayTimeout: 5000, 609 responsive: { 610 0:{ 611 items:1, 612 autoWidth: false 613 }, 614 400:{ 615 items:1, 616 autoWidth: false 617 }, 618 600:{ 619 items:1, 620 autoWidth: false 621 }, 622 1000:{ 623 items:1, 624 autoWidth: false 625 }, 626 1200:{ 627 items:1, 628 autoWidth: false 629 } 630 }, 631 }) 632 633 .on('click', '.owl-item', function () { 634 $sync3.trigger('to.owl.carousel', [$(this).index(), duration, true]); 635 }) 636 .on('changed.owl.carousel', function (e) { 637 if (!flag) { 638 flag = true; 639 $sync3.trigger('to.owl.carousel', [e.item.index, duration, true]); 640 flag = false; 641 } 642 }); 643 } 644 645 646 if ($('.theme_carousel').length) { 647 $(".theme_carousel").each(function (index) { 648 var $owlAttr = {}, 649 $extraAttr = $(this).data("options"); 650 $.extend($owlAttr, $extraAttr); 651 $(this).owlCarousel($owlAttr); 652 }); 653 } 654 655 656 657 //Add One Page nav 658 if($('.scroll-nav').length) { 659 $('.scroll-nav').onePageNav(); 660 } 661 662 //Sortable Masonary with Filters 663 function enableMasonry() { 664 if($('.sortable-masonry').length){ 665 666 var winDow = $(window); 667 // Needed variables 668 var $container=$('.sortable-masonry .items-container'); 669 var $filter=$('.filter-btns'); 670 671 $container.isotope({ 672 filter:'*', 673 masonry: { 674 columnWidth : '.masonry-item.small-column' 675 }, 676 animationOptions:{ 677 duration:500, 678 easing:'linear' 679 } 680 }); 681 682 683 // Isotope Filter 684 $filter.find('li').on('click', function(){ 685 var selector = $(this).attr('data-filter'); 686 687 try { 688 $container.isotope({ 689 filter : selector, 690 animationOptions: { 691 duration: 500, 692 easing : 'linear', 693 queue : false 694 } 695 });
696 } catch(err) { 697 698 } 699 return false; 700 }); 701 702 703 winDow.on('resize', function(){ 704 var selector = $filter.find('li.active').attr('data-filter'); 705 706 $container.isotope({ 707 filter : selector, 708 animationOptions: { 709 duration: 500, 710 easing : 'linear', 711 queue : false 712 } 713 }); 714 }); 715 716 717 var filterItemA = $('.filter-btns li'); 718 719 filterItemA.on('click', function(){ 720 var $this = $(this); 721 if ( !$this.hasClass('active')) { 722 filterItemA.removeClass('active'); 723 $this.addClass('active'); 724 } 725 }); 726 } 727 } 728 729 enableMasonry(); 730 731 732 // Progress Bar 733 if ($('.count-bar').length) { 734 $('.count-bar').appear(function(){ 735 var el = $(this); 736 var percent = el.data('percent'); 737 $(el).css('width',percent).addClass('counted'); 738 },{accY: -50}); 739 740 } 741 742 743 // page direction 744 function directionswitch() { 745 if ($('.page_direction').length) { 746 747 $('.direction_switch button').on('click', function() { 748 $('body').toggleClass(function(){ 749 return $(this).is('.rtl, .ltr') ? 'rtl ltr' : 'rtl'; 750 }) 751 }); 752 }; 753 } 754 755 756 //Parallax Scene for Icons 757 if($('.parallax-scene-1').length){ 758 var scene = $('.parallax-scene-1').get(0); 759 var parallaxInstance = new Parallax(scene); 760 } 761 if($('.parallax-scene-2').length){ 762 var scene = $('.parallax-scene-2').get(0); 763 var parallaxInstance = new Parallax(scene); 764 } 765 if($('.parallax-scene-3').length){ 766 var scene = $('.parallax-scene-3').get(0); 767 var parallaxInstance = new Parallax(scene); 768 } 769 if($('.parallax-scene-4').length){ 770 var scene = $('.parallax-scene-4').get(0); 771 var parallaxInstance = new Parallax(scene); 772 } 773 if($('.parallax-scene-5').length){ 774 var scene = $('.parallax-scene-5').get(0); 775 var parallaxInstance = new Parallax(scene); 776 } 777 if($('.parallax-scene-6').length){ 778 var scene = $('.parallax-scene-6').get(0); 779 var parallaxInstance = new Parallax(scene); 780 } 781 if($('.parallax-scene-7').length){ 782 var scene = $('.parallax-scene-7').get(0); 783 var parallaxInstance = new Parallax(scene); 784 } 785 786 787 788 // 6 pieChart RoundCircle 789 function expertizeRoundCircle () { 790 var rounderContainer = $('.piechart'); 791 if (rounderContainer.length) { 792 rounderContainer.each(function () { 793 var Self = $(this); 794 var value = Self.data('value'); 795 var size = Self.parent().width(); 796 var color = Self.data('fg-color'); 797 798 Self.find('span').each(function () { 799 var expertCount = $(this); 800 expertCount.appear(function () { 801 expertCount.countTo({ 802 from: 1, 803 to: value*100, 804 speed: 3000 805 }); 806 }); 807 808 }); 809 Self.appear(function () { 810 Self.circleProgress({ 811 value: value, 812 size: 100, 813 thickness: 8, 814 emptyFill: '#f2f2f2', 815 animation: { 816 duration: 3000 817 }, 818 fill: { 819 color: color 820 } 821 }); 822 }); 823 }); 824 }; 825 } 826 827 828 // 6 pieChart RoundCircle 829 function expertizeRoundCircle2 () { 830 var rounderContainer = $('.piechart_2'); 831 if (rounderContainer.length) { 832 rounderContainer.each(function () { 833 var Self = $(this); 834 var value = Self.data('value'); 835 var size = Self.parent().width(); 836 var color = Self.data('fg-color'); 837 838 Self.find('span').each(function () { 839 var expertCount = $(this); 840 expertCount.appear(function () { 841 expertCount.countTo({ 842 from: 1, 843 to: value*100, 844 speed: 3000 845 }); 846 }); 847 848 }); 849 Self.appear(function () { 850 Self.circleProgress({ 851 value: value, 852 size: 130, 853 thickness: 8, 854 emptyFill: '#f2f2f2', 855 animation: { 856 duration: 3000 857 }, 858 fill: { 859 color: color 860 } 861 }); 862 }); 863 }); 864 }; 865 } 866 867 868 $(document).ready(function() { 869 $('select:not(.ignore)').niceSelect(); 870 }); 871 872 873 // Date picker 874 function datepicker () { 875 if ($('#datepicker').length) { 876 $('#datepicker').datepicker(); 877 }; 878 } 879 880 881 if($('.paroller').length){ 882 $('.paroller').paroller({ 883 factor: 0.1, // multiplier for scrolling speed and offset, +- values for direction control 884 factorLg: 0.1, // multiplier for scrolling speed and offset if window width is less than 1200px, +- values for direction control 885 type: 'foreground', // background, foreground 886 direction: 'vertical' // vertical, horizontal 887 }); 888 } 889 890 if($('.paroller-2').length){ 891 $('.paroller-2').paroller({ 892 factor: -0.1, // multiplier for scrolling speed and offset, +- values for direction control 893 factorLg: -0.1, // multiplier for scrolling speed and offset if window width is less than 1200px, +- values for direction control 894 type: 'foreground', // background, foreground 895 direction: 'vertical' // vertical, horizontal 896 }); 897 } 898 899 if($('.paroller-3').length){ 900 $('.paroller-3').paroller({ 901 factor: 0.1, // multiplier for scrolling speed and offset, +- values for direction control 902 factorLg: 0.1, // multiplier for scrolling speed and offset if window width is less than 1200px, +- values for direction control 903 type: 'foreground', // background, foreground 904 direction: 'horizontal' // vertical, horizontal 905 }); 906 } 907 908 if($('.paroller-4').length){ 909 $('.paroller-4').paroller({ 910 factor: -0.1, // multiplier for scrolling speed and offset, +- values for direction control 911 factorLg: -40.1, // multiplier for scrolling speed and offset if window width is less than 1200px, +- values for direction control 912 type: 'foreground', // background, foreground 913 direction: 'horizontal' // vertical, horizontal 914 }); 915 } 916 917 918 if($('.timer').length){ 919 $(function(){ 920 $('[data-countdown]').each(function() { 921 var $this = $(this), finalDate = $(this).data('countdown'); 922 $this.countdown(finalDate, function(event) { 923 $this.html(event.strftime('%D days %H:%M:%S')); 924 }); 925 }); 926 }); 927 928 $('.cs-countdown').countdown('').on('update.countdown', function(event) { 929 var $this = $(this).html(event.strftime('<div class="count-col"><span>%D</span><h6>days</h6></div> <div class="count-col"><span>%H</span><h6>Hours</h6></div> <div class="count-col"><span>%M</span><h6>Minutes</h6></div> <div class="count-col"><span>%S</span><h6>Seconds</h6></div>')); 930 }); 931 } 932 933 934 //Price Range Slider 935 if($('.price-range-slider').length){ 936 $( ".price-range-slider" ).slider({ 937 range: true, 938 min: 120, 939 max: 500, 940 values: [ 120, 300 ], 941 slide: function( event, ui ) { 942 $( "input.property-amount" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] ); 943 } 944 }); 945 946 $( "input.property-amount" ).val( $( ".price-range-slider" ).slider( "values", 0 ) + " - $" + $( ".price-range-slider" ).slider( "values", 1 ) ); 947 } 948 949 950 //Jquery Spinner / Quantity Spinner 951 if($('.quantity-spinner').length){ 952 $("input.quantity-spinner").TouchSpin({ 953 verticalbuttons: true 954 }); 955 } 956 957 958 if ($('.product-details-content .bxslider').length) { 959 $('.product-details-content .bxslider').bxSlider({ 960 nextSelector: '.product-details-content #slider-next', 961 prevSelector: '.product-details-content #slider-prev', 962 nextText: '<i class="fa fa-angle-right"></i>', 963 prevText: '<i class="fa fa-angle-left"></i>', 964 mode: 'fade', 965 auto: 'true', 966 speed: '700', 967 pagerCustom: '.product-details-content .slider-pager .thumb-box' 968 }); 969 }; 970 971 972 //Search Popup 973 if($('#search-popup').length){ 974 975 //Show Popup 976 $('.search-toggler').on('click', function() { 977 $('#search-popup').addClass('popup-visible'); 978 }); 979 $(document).keydown(function(e){
980 if(e.keyCode === 27) { 981 $('#search-popup').removeClass('popup-visible'); 982 } 983 }); 984 //Hide Popup 985 $('.close-search,.search-popup .overlay-layer').on('click', function() { 986 $('#search-popup').removeClass('popup-visible'); 987 }); 988 } 989 990 991 function tabpane() { 992 if($('.tab-pane').length){ 993 $('.tab-pane').delay(10).css("display", "none"); 994 } 995 } 996 997 998 999 // Scroll top button 1000 $('.scroll-top-inner').on("click", function () { 1001 $('html, body').animate({scrollTop: 0}, 500); 1002 return false; 1003 }); 1004 1005 1006 function handleScrollbar() { 1007 const bHeight = $('body').height(); 1008 const scrolled = $(window).innerHeight() + $(window).scrollTop(); 1009 1010 let percentage = ((scrolled / bHeight) * 100); 1011 1012 if (percentage > 100) percentage = 100; 1013 1014 $('.scroll-top-inner .bar-inner').css( 'width', percentage + '%'); 1015 } 1016 1017 1018 1019 /* 9. ScrollAnimations */ 1020 var $containers = $('[data-animation]:not([data-animation-text]), [data-animation-box]'); 1021 $containers.scrollAnimations(); 1022 1023 1024 1025 1026 function onHoverthreeDmovement() { 1027 var tiltBlock = $('.js-tilt'); 1028 if(tiltBlock.length) { 1029 $('.js-tilt').tilt({ 1030 maxTilt: 20, 1031 perspective:700, 1032 glare: true, 1033 maxGlare: 0 1034 }) 1035 } 1036 } 1037 1038 1039 1040 1041 /* ========================================================================= 1042 When document is Scrollig, do 1043 ========================================================================== */ 1044 1045 jQuery(document).on('ready', function () { 1046 (function ($) { 1047 // add your functions 1048 directionswitch(); 1049 datepicker (); 1050 onHoverthreeDmovement(); 1051 })(jQuery); 1052 }); 1053 1054 1055 1056 /* ========================================================================== 1057 When document is Scrollig, do 1058 ========================================================================== */ 1059 1060 $(window).on('scroll', function() { 1061 headerStyle(); 1062 handleScrollbar(); 1063 if ($(window).scrollTop() > 200) { 1064 $('.scroll-top-inner').addClass('visible'); 1065 } else { 1066 $('.scroll-top-inner').removeClass('visible'); 1067 } 1068 }); 1069 1070 1071 1072 /* ========================================================================== 1073 When document is loaded, do 1074 ========================================================================== */ 1075 1076 $(window).on('load', function() { 1077 handlePreloader(); 1078 enableMasonry(); 1079 expertizeRoundCircle (); 1080 expertizeRoundCircle2 (); 1081 tabpane(); 1082 }); 1083 1084 1085 1086})(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.