1/*--------------------------------------------- 2Template name: Kinen Ecommerce 3Version: 1.0 4Author: ThemeLooks 5Author url: http://themelooks.com 6 7NOTE: 8------ 9Please DO NOT EDIT THIS JS, you may need to use "custom.js" file for writing your custom js. 10We may release future updates so it will overwrite this file. it's better and safer to use "custom.js". 11 12[Table of Content] 13 1401: Main menu 1502: Background image 1603: Parsley form validation 1704: Smooth scroll for comment reply 1805: Back to top button 1907: Changing svg color 2008: Ajax Contact Form 2109: Intro item height 2210: Preloader 2311: magnificPopup installation 2412: Google map 2513: banner carosule1 2614: banner carosule2 2715: insta feed carousel 2816: banner slider3 2917: banner slider4 3018: testimonial carousel 3119: product details slider 3220: product details slider 3321: parallax activation 3422: category menu 3523: offcanvas wishlist 3624: shop filter menu 3725: Main menu ofcanvas 3826: home page 2 Main menu ofcanvas 3927: Section title span width 4028: offcanvas cart 4129: offcanvas account 4230: About image focus 4331: counter up 4432: Count Down 4533: Packery install 4634: Collection carousel 4735: Common Carousel Activation 4836: Catagory hover menu 4937: modal window 5038: modal quick view slider 5139: cart list remover 5240: cart list incriment 5341: Search bar input text 5442: Wish list and add to cart ontifaction 5543: title Text animation 5644: Coming soon animation home4 57----------------------------------------------*/ 58 59 (function($) { 60 "use strict"; 61 62 /* 01: Main menu 63 ==============================================*/ 64 $('.header-menu a[href="#"]').on('click', function(event) { 65 event.preventDefault(); 66 }); 67 68 $("#menu-button").append( 69 '<span class="bar bar1"></span>', 70 '<span class="bar bar2"></span>', 71 '<span class="bar bar3"></span>' 72 ) 73 74 var mainHeader = $('.main-header'); 75 $(window).scrollTop() > 100 && mainHeader.addClass("sticky fadeInDown"); 76 $(window).on('scroll', function(e){ 77 if($(this).scrollTop() < $('.main-header').height()){ 78 $('.main-header').removeClass('sticky'); 79 }else 80 $('.main-header').addClass('sticky'); 81 $('.relative-header').removeClass('sticky'); 82 83 84 if($('.relative-header').length !== 0){ 85 var r = $('.relative-header').offset().top 86 if($(this).scrollTop() < r ){ 87 $('.relative-header.relative-header').removeClass('sticky'); 88 }else 89 $('.relative-header').addClass('sticky'); 90 } 91 92 if( $(this).scrollTop() < 300){ 93 $('.sticky-social-area').removeClass('sticky'); 94 }else 95 $('.sticky-social-area').addClass('sticky'); 96 97 98 }); 99 100 /*innear header*/ 101 // $(document).ready(function(){ 102 // var headerheight = $('.inner-page-header').outerHeight(); 103 // if($('.page-title-inner') !== 0) 104 // $('.page-title-inner').css({ 105 // marginTop : headerheight 106 // }) 107 // }) 108 109 /* 02: Background image 110 ==============================================*/ 111 112 var bgImg = $('[data-bg-img]'); 113 114 bgImg.css('background', function(){ 115 return 'url(' + $(this).data('bg-img') + ') center center'; 116 }); 117 118 119 /* 03: Parsley form validation 120 ==============================================*/ 121 122 $('.parsley-validate, .parsley-validate form').parsley(); 123 124 125 /* 04: Smooth scroll for comment reply 126 ==============================================*/ 127 128 var $commentContent = $('.comment-content > a'); 129 130 $commentContent.on('click', function(event){ 131 event.preventDefault(); 132 var $target = $('.comment-form'); 133 134 if ( $target.length ) { 135 $('html, body').animate({ 136 scrollTop: $target.offset().top - 120 137 }, 500); 138 139 $target.find('textarea').focus(); 140 } 141 }); 142 143 144 /*============================================ 145 05: Back to top button 146 ==============================================*/ 147 148 var $backToTopBtn = $('.back-to-top'); 149 150 if ($backToTopBtn.length) { 151 var scrollTrigger = 400, // px 152 backToTop = function () { 153 var scrollTop = $(window).scrollTop(); 154 if (scrollTop > scrollTrigger) { 155 $backToTopBtn.addClass('show'); 156 } else { 157 $backToTopBtn.removeClass('show'); 158 } 159 }; 160 161 backToTop(); 162 163 $(window).on('scroll', function () { 164 backToTop(); 165 }); 166 167 $backToTopBtn.on('click', function (e) { 168 e.preventDefault(); 169 $('html,body').animate({ 170 scrollTop: 0 171 }, 700); 172 }); 173 } 174 175 176 177 /* ==================================================== 178 06: Product carousel 179 ====================================================*/ 180 $('.shop-product-slider').owlCarousel({ 181 loop:true, 182 margin:30, 183 nav:false, 184 dots: false, 185 center:true, 186 responsive:{ 187 0:{ 188 items:1 189 }, 190 575:{ 191 items:2 192 }, 193 768:{ 194 items:3 195 }, 196 991:{ 197 items:4 198 }, 199 1100:{ 200 items:5 201 } 202 } 203 }); 204 205 /*============================================ 206 07: Changing svg color 207 ==============================================*/ 208 209 jQuery('img.svg').each(function(){ 210 var $img = jQuery(this); 211 var imgID = $img.attr('id'); 212 var imgClass = $img.attr('class'); 213 var imgURL = $img.attr('src'); 214 215 jQuery.get(imgURL, function(data) { 216 // Get the SVG tag, ignore the rest 217 var $svg = jQuery(data).find('svg'); 218 219 // Add replaced image's ID to the new SVG 220 if(typeof imgID !== 'undefined') { 221 $svg = $svg.attr('id', imgID); 222 } 223 // Add replaced image's classes to the new SVG 224 if(typeof imgClass !== 'undefined') { 225 $svg = $svg.attr('class', imgClass+' replaced-svg'); 226 } 227
228 // Remove any invalid XML tags as per http://validator.w3.org 229 $svg = $svg.removeAttr('xmlns:a'); 230 231 // Check if the viewport is set, else we gonna set it if we can. 232 if(!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) { 233 $svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width')); 234 } 235 236 // Replace image with new SVG 237 $img.replaceWith($svg); 238 239 }, 'xml'); 240 }); 241 242 /*============================================= 243 08: Ajax Contact Form 244 ==============================================*/ 245 246 $('.address-form-inner').on('submit', 'form', function(e) { 247 e.preventDefault(); 248 249 var $el = $(this); 250 251 $.post($el.attr('action'), $el.serialize(), function(res){ 252 res = $.parseJSON( res ); 253 $el.parent('.contact-page-form').find('.form-response').html('<span>' + res[1] + '</span>'); 254 }); 255 }); 256 257 /*============================================ 258 09: Intro item height 259 ==============================================*/ 260 261 function pageItemHeight(){ 262 $('.page-image').height( 263 function(){ 264 return $(this).width(); 265 } 266 ); 267 } 268 269 pageItemHeight(); 270 271 $(window).resize( function(){ 272 pageItemHeight(); 273 }); 274 275 276 277 /*============================================== 278 10: Preloader 279 ==============================================*/ 280 281 $(window).on('load', function(){ 282 283 function removePreloader() { 284 var preLoader = $('.preLoader'); 285 preLoader.fadeOut(); 286 } 287 setTimeout(removePreloader, 250); 288 }); 289 290 291 292 293/*===================================================== 294 11: magnificPopup installation 295=====================================================*/ 296 var c = $('[data-popup="img"]'); 297 c.length && c.magnificPopup({ 298 type: "image" 299 }); 300 c = $('[data-popup="video"]'); 301 c.length && c.magnificPopup({ 302 type: "iframe" 303 }); 304 305/*=================================================== 306 12: Google map 307===================================================*/ 308 //Google Map 309 if($('#map').length !==0){ 310 311 var googleMapSelector = $('#map'); 312 var latitude = $('.google-map-wrapper').attr('data-latitude'); 313 var longitude = $('.google-map-wrapper').attr('data-longitude'); 314 var zoome = $('.google-map-wrapper').attr('data-zoom'); 315 var zoomtoNum = Number(zoome); 316 var mapmarker = $('.google-map-wrapper').attr('data-marker'); 317 var myCenter = new google.maps.LatLng(latitude, longitude); 318 319 function initialize() { 320 var mapProp = { 321 center: myCenter, 322 zoom: zoomtoNum, 323 scrollwheel: false, 324 mapTypeId: google.maps.MapTypeId.ROADMAP, 325 styles: [ 326 { 327 "featureType": "landscape.man_made", 328 "elementType": "geometry", 329 "stylers": [ 330 { 331 "color": "#f7f1e0" 332 } 333 ] 334 }, 335 { 336 "featureType": "landscape.natural", 337 "elementType": "geometry", 338 "stylers": [ 339 { 340 "color": "#d0e3b4" 341 } 342 ] 343 }, 344 { 345 "featureType": "landscape.natural.terrain", 346 "elementType": "geometry", 347 "stylers": [ 348 { 349 "visibility": "off" 350 } 351 ] 352 }, 353 { 354 "featureType": "poi", 355 "elementType": "labels", 356 "stylers": [ 357 { 358 "visibility": "off" 359 } 360 ] 361 }, 362 { 363 "featureType": "poi.business", 364 "elementType": "all", 365 "stylers": [ 366 { 367 "visibility": "off" 368 } 369 ] 370 }, 371 { 372 "featureType": "poi.medical", 373 "elementType": "geometry", 374 "stylers": [ 375 { 376 "color": "#fbd3da" 377 } 378 ] 379 }, 380 { 381 "featureType": "poi.park", 382 "elementType": "geometry", 383 "stylers": [ 384 { 385 "color": "#bde6ab" 386 } 387 ] 388 }, 389 { 390 "featureType": "road", 391 "elementType": "geometry.stroke", 392 "stylers": [ 393 { 394 "visibility": "off" 395 } 396 ] 397 }, 398 { 399 "featureType": "road", 400 "elementType": "labels", 401 "stylers": [ 402 { 403 "visibility": "off" 404 } 405 ] 406 }, 407 { 408 "featureType": "road.highway", 409 "elementType": "geometry.fill", 410 "stylers": [ 411 { 412 "color": "#ffe36f" 413 } 414 ] 415 }, 416 { 417 "featureType": "road.highway", 418 "elementType": "geometry.stroke", 419 "stylers": [ 420 { 421 "color": "#efd151" 422 } 423 ] 424 }, 425 { 426 "featureType": "road.arterial", 427 "elementType": "geometry.fill", 428 "stylers": [ 429 { 430 "color": "#ffffff" 431 } 432 ] 433 }, 434 { 435 "featureType": "road.local", 436 "elementType": "geometry.fill", 437 "stylers": [ 438 { 439 "color": "black" 440 } 441 ] 442 }, 443 { 444 "featureType": "transit.station.airport", 445 "elementType": "geometry.fill", 446 "stylers": [ 447 { 448 "color": "#cfb2db" 449 } 450 ] 451 }, 452 { 453 "featureType": "water", 454 "elementType": "geometry", 455 "stylers": [ 456 { 457 "color": "#a2daf2" 458 } 459 ] 460 } 461 ] 462 }; 463 var map = new google.maps.Map( document.getElementById('map'), mapProp ); 464 var marker = new google.maps.Marker({ 465 position: myCenter, 466 icon: mapmarker, 467 });
468 marker.setMap(map); 469 470 471 } 472 if (googleMapSelector.length) { 473 google.maps.event.addDomListener(window, 'load', initialize); 474 } 475 } 476 477 478 /*======================================================== 479 13: banner carosule1 480 ========================================================*/ 481 var slider1 = $('.banner-carousel1'); 482 483 slider1.owlCarousel({ 484 loop:true, 485 margin:0, 486 nav:false, 487 dots: true, 488 animateOut: 'fadeOut', 489 animateIn: 'fadeIn', 490 autoplaySpeed:50000, 491 mouseDrag:false, 492 autoplay: true, 493 responsive:{ 494 0:{ 495 items:1 496 }, 497 600:{ 498 items:1 499 }, 500 1000:{ 501 items:1 502 } 503 } 504 }); 505/*======================================================== 506 14: banner carosule2 507 ========================================================*/ 508 var slider2 = $('.banner-carousel2'); 509 510 slider2.owlCarousel({ 511 loop:true, 512 margin:0, 513 nav:true, 514 dots: false, 515 animateOut: 'fadeOut', 516 animateIn: 'fadeIn', 517 navText:['<i class="fa fa-angle-left"></i> Previous','next <i class="fa fa-angle-right"></i>'], 518 autoplaySpeed:4000, 519 mouseDrag:false, 520 responsive:{ 521 0:{ 522 items:1 523 }, 524 600:{ 525 items:1 526 }, 527 1000:{ 528 items:1 529 }, 530 1200:{ 531 items:1, 532 stagePadding: 200, 533 } 534 } 535 }); 536 537/*===================================================== 538 15: insta feed carousel 539 =====================================================*/ 540$('.insta-feed-carousel').owlCarousel({ 541 loop:true, 542 margin:10, 543 nav:false, 544 dots: true, 545 center:true, 546 responsive:{ 547 0:{ 548 items:1 549 }, 550 480:{ 551 items:2 552 }, 553 600:{ 554 items:5 555 }, 556 1000:{ 557 items:11 558 } 559 } 560 }); 561/*===================================================== 562 16: banner slider3 563=====================================================*/ 564$('.banner-carousel3').owlCarousel({ 565 loop:true, 566 margin:0, 567 nav:false, 568 dots: true, 569 animateOut: 'fadeOut', 570 animateIn: 'fadeIn', 571 autoplaySpeed:4000, 572 autoplayTimeout:5000, 573 autoplay:true, 574 mouseDrag:false, 575 responsive:{ 576 0:{ 577 items:1 578 }, 579 600:{ 580 items:1 581 }, 582 1000:{ 583 items:1 584 } 585 } 586 }); 587 588/*===================================================== 589 17: banner slider4 590=====================================================*/ 591var banner4 = $('.banner-carousel4'); 592banner4.owlCarousel({ 593 loop:true, 594 margin:0, 595 nav:false, 596 dots: false, 597 responsive:{ 598 0:{ 599 items:1 600 }, 601 480:{ 602 items:2 603 }, 604 700:{ 605 items:3 606 }, 607 960:{ 608 items:4 609 }, 610 1200:{ 611 items:6 612 } 613 } 614 }); 615 616 617/*===================================================== 618 18: testimonial carousel 619=====================================================*/ 620$('.testimonial-carousel').owlCarousel({ 621 loop:true, 622 margin:10, 623 nav:true, 624 navText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'], 625 dots: false, 626 center:true, 627 responsive:{ 628 0:{ 629 items:1 630 }, 631 600:{ 632 items:1 633 }, 634 1000:{ 635 items:1 636 } 637 } 638 }); 639 640/*================================================== 641 20: product details slider 642==================================================*/ 643 let $productGallery = $('.product-gallery'), 644 $productThumbs = $('.product-thumbs'); 645 646 647 let productPreview = new Swiper($productGallery, { 648 spaceBetween: 1, 649 touchRatio: 0, 650 effect: 'fade', 651 pagination: { 652 el: '.product-gallery-pagination', 653 clickable: true, 654 } 655 }); 656 657 let productThumbs = new Swiper($productThumbs, { 658 spaceBetween: 10, 659 slidesPerView: 4, 660 slideToClickedSlide: true, 661 }); 662 $('.product-gallery .swiper-slide-active img').elevateZoom({ 663 zoomType: "inner", 664 lensShape : "round", 665 lensSize : 200, 666 zoomWindowFadeIn: 500, 667 zoomWindowFadeOut: 500 668 }); 669 670 $productThumbs.on('click','.swiper-slide', function (event) { 671 var $t = $(this); 672 productPreview.slideTo( $t.index()); 673 $t.addClass('active swiper-slide-active').siblings().removeClass('active swiper-slide-active'); 674 $('.product-gallery .swiper-slide-active img').elevateZoom({ 675 zoomType: "inner", 676 lensShape : "round", 677 lensSize : 200, 678 zoomWindowFadeIn: 500, 679 zoomWindowFadeOut: 500 680 }); 681 682 }); 683 684 685 686 687/*================================================ 688 21: parallax activation 689================================================*/ 690var $parallaxLayers = $('[data-trigger="parallax_layers"]'); 691 692 if( $parallaxLayers.length ){ 693 $parallaxLayers.each(function () { 694 new Parallax( $(this)[0], { 695 selector: '[data-depth]' 696 }); 697 }); 698 } 699 700/*================================================== 701 22: category menu 702==================================================*/ 703var wwidth = $(window).width(); 704$('.search-btn').on('click', function(event){ 705 event.preventDefault(); 706 $('.search-bar').css('display','block'); 707 $('.catagory-menu-wrap').css('padding-top', '0px'); 708 $('body').delay(500).addClass('modal-window-open'); 709 if(wwidth > 680){ 710 $('.catagory-menu').addClass('active search-menu'); 711 }else{ 712 $('.catagory-menu').addClass('active'); 713 } 714 715}); 716$('.menu-cancel').on('click', function(){ 717 $(this).parents('.catagory-menu').removeClass('active search-menu'); 718 $('body').delay(500).removeClass('modal-window-open'); 719}) 720$('.menu-btn').on('click', function(event){ 721 event.preventDefault(); 722 $('.search-bar').hide(); 723 $('.catagory-menu-wrap').css('padding-top', '100px'); 724 $('.catagory-menu').addClass('active'); 725 $('body').delay(500).addClass('modal-window-open'); 726}); 727$('.menu-cancel').on('click', function(){ 728 $('.catagory-menu').removeClass('active'); 729 $('body').delay(500).removeClass('modal-window-open'); 730}); 731 732 733$('.catagory-menu-wrap ul li').on('click', function(){ 734 $(this).each(function(){ 735 $(this).children('ul').toggleClass('open') 736 }) 737}) 738 739/*============================================== 740 23: offcanvas wishlist 741==============================================*/ 742 $('.wishlist-btn-off, .cart-btn, .account-btn').on('click', function(event) { 743 event.preventDefault(); 744 $('.offcanvas-overlay').css({ 745 'opacity' : 1, 746 'visibility': "visible" 747 }); 748 });
749 750 751 752$('.offcanvas-overlay').on('click',function(){ 753 $('.offcanvas').removeClass('show'); 754 $(this).css({ 755 'opacity' : 0, 756 'visibility': 'hidden' 757 }); 758}); 759 760$('.wishlist-btn-off').on('click',function(){ 761 $('.offcanvas-wishlist').addClass('show') 762}); 763$('.offcanvas-cancel').on('click',function(){ 764 $('.offcanvas-wishlist').removeClass('show') 765 $('.offcanvas-overlay').css({ 766 'opacity' : 0, 767 'visibility': 'hidden' 768 }); 769}); 770 771 772/*==================================================== 773 24: shop filter menu 774====================================================*/ 775$('.product-filter > a').on('click', function(event){ 776 event.preventDefault(); 777}) 778$('.product-filter-mobile a').on('click', function(event){ 779 event.preventDefault(); 780 $('.offcanvas-overlay').css({ 781 'opacity' : 1, 782 'visibility': 'visible' 783 }); 784 785 $('.offcanvas-filter').addClass('show'); 786}) 787$('.offcanvas-cancel').on('click', function(){ 788 $('.offcanvas-filter').removeClass('show') 789 }); 790if(wwidth <= 991){ 791 $('.shope-filter-item > ul').addClass('open'); 792 $('.woocommerce-products-header').appendTo('.offcanvas-filter') 793} 794/*====================================================== 795 25: Main menu ofcanvas 796======================================================*/ 797 798 799$('#menu-button').on('click', function(){ 800 $('.offcanvas-overlay').css({ 801 'opacity' : 1, 802 'visibility': 'visible' 803 }); 804 805 $('.offcanvas-mainmenu').addClass('show'); 806 }) 807$('.offcanvas-cancel').on('click', function(){ 808 $('.offcanvas-mainmenu').removeClass('show') 809 }); 810 811if(wwidth <= 991){ 812 $('.header-menu > ul').addClass('open'); 813 $('.header-menu > ul').appendTo('.offcanvas-mainmenu') 814} 815 816$('.offcanvas-mainmenu').find('ul li').parents('.offcanvas-mainmenu ul li').addClass('has-sub-item'); 817 818 819$('.offcanvas-mainmenu').find(".has-sub-item").prepend('<span class="submenu-button"></span>'); 820$('.offcanvas-mainmenu').find('.submenu-button').on('click', function(){ 821 $(this).toggleClass('submenu-opened'); 822 if ($(this).siblings('ul').hasClass('open')) { 823 $(this).siblings('ul').removeClass('open').slideUp('fast'); 824 } else { 825 $(this).siblings('ul').addClass('open').slideDown('fast'); 826 } 827}); 828/*============================================================ 829 26: home page 2 Main menu ofcanvas 830============================================================*/ 831$('.main-menu-btn').on('click',function(){ 832 $('.header-offcanvas2').addClass('show') 833}); 834$('.offcanvas-cancel').on('click', function(){ 835 $(this).parents('.header-offcanvas2').removeClass('show') 836}) 837 838// home page 3 Main menu ofcanvas 839$('.header-style3 .header-menu > ul').addClass('open'); 840$('.header-style3 .header-menu > ul').appendTo('.header-offcanvas2'); 841 842// home page 2 Main menu ofcanvas 843$('.header-style2 .header-menu > ul').addClass('open'); 844$('.header-style2 .header-menu > ul').appendTo('.header-offcanvas2'); 845 846$('.header-offcanvas2').find('ul li').parents('.header-offcanvas2 ul li').addClass('has-sub-item'); 847$('.header-offcanvas2').find(".has-sub-item").prepend('<span class="submenu-button"></span>'); 848$('.header-offcanvas2').find('.submenu-button').on('click', function(){ 849 $(this).toggleClass('submenu-opened'); 850 if ($(this).siblings('ul').hasClass('open')) { 851 $(this).siblings('ul').removeClass('open').slideUp('fast'); 852 } else { 853 $(this).siblings('ul').addClass('open').slideDown('fast'); 854 } 855}); 856 857$('.offcanvas-mainmenu').find('ul li').parents('.header-menu ul li').addClass('has-sub-item'); 858$('.header-menu').find('ul li').parents('.header-menu ul li').addClass('has-sub-item'); 859/*========================================================== 860 27: Section title span width 861==========================================================*/ 862if($(window).width() >= 768){ 863 $('.section-title-wrap').each(function(){ 864 var swidth = $(this).width(); 865 var mainwidth = $(this).find('.section-title h2').width(); 866 var childwidth = swidth - mainwidth; 867 $(this).find('.section-title h2 span').css({ 868 width : childwidth 869 }); 870 });
871} 872 873/*============================================== 874 28: offcanvas cart 875==============================================*/ 876$('.cart-btn').on('click',function(){ 877 $('.offcanvas-cart-list').addClass('show') 878}); 879$('.offcanvas-cancel').on('click',function(){ 880 $('.offcanvas-cart-list').removeClass('show') 881}); 882 883/*============================================== 884 29: offcanvas account 885==============================================*/ 886$('.account-btn').on('click',function(){ 887 $('.offcanvas-account').addClass('show') 888}); 889$('.offcanvas-cancel').on('click',function(){ 890 $('.offcanvas-account').removeClass('show') 891}); 892/*===================================================== 893 30: About image focus 894=====================================================*/ 895$('.about-image1, .about-image2, .about-image3').on('mouseenter', function(){ 896 $(this).css({ 897 'z-index': '10', 898 }); 899 $(this).siblings().css({ 900 'opacity':'.4', 901 'z-index': '-10', 902 'transition': '.3s all linear' 903 }); 904 905 906}).on('mouseleave', function(){ 907 $(this).css({ 908 'z-index': 'inherit' 909 }); 910 $(this).siblings().css({ 911 'z-index': '1', 912 'opacity':'1', 913 'transition': '.3s all linear' 914 }); 915 $('.about-image2').css('z-index', '15') 916}); 917 918 /*========================================================= 919 31: counter up 920 =========================================================*/ 921 $('.counter').counterUp({}); 922 923 924 /* =================================================== 925 32: Count Down 926 =================================================== */ 927 var $countDown = $('[data-countdown]'); 928 $countDown.each(function () { 929 var $t = $(this); 930 931 $t.countdown($t.data('countdown'), function(e) { 932 $(this).html( '<ul class="list-unstyled">' + e.strftime('<li><strong>%D</strong><span>Days</span></li><li><strong>%H</strong><span>Hours</span></li><li><strong>%M</strong><span>Min</span></li><li><strong>%S</strong><span>Sec</span></li>') + '</ul>' ); 933 }); 934 }); 935 936/*==================================================== 937 33: Packery install 938====================================================*/ 939 940$(window).on('load', function(){ 941 if($('.isotope').length != 0){ 942 $('.isotope').packery({ 943 itemSelector: '.grid-item', 944 percentPosition: true, 945 masonry: { 946 columnWidth: '.grid-item' 947 } 948 }); 949 } 950}) 951 952$('.product-grid-view ul li a').on('click, load', function(){ 953 $('.isotope2').packery() 954}) 955 956/*====================================================== 957 34: Collection carousel 958======================================================*/ 959 let $productGallery2 = $('.gallery-top'), 960 $productThumbs2 = $('.gallery-thumbs'); 961 962 if($productGallery2.length !==0 ){ 963 let productThumbs = new Swiper($productThumbs2, { 964 spaceBetween: 10, 965 slidesPerView: 7, 966 autoplay: { 967 delay: 3000, 968 disableOnInteraction: true, 969 }, 970 breakpoints: { 971 // when window width is <= 1199px 972 1199: { 973 slidesPerView: 7 974 }, 975 // when window width is <= 991px 976 991: { 977 slidesPerView: 5 978 }, 979 // when window width is <= 767px 980 767: { 981 slidesPerView: 4 982 }, 983 // when window width is <= 575px 984 575: { 985 slidesPerView: 3 986 } 987 } 988 }); 989 let productPreview = new Swiper($productGallery2, { 990 spaceBetween: 1, 991 autoplay: { 992 delay: 3000, 993 disableOnInteraction: true, 994 } 995 996 }); 997 998 $productThumbs2.on('click', '.swiper-slide', function (e) { 999 let $t = $(this); 1000 productPreview.slideTo( $t.index() ); 1001 $t.addClass('active, swiper-slide-active').siblings().removeClass('active, swiper-slide-active'); 1002 $t.find('.collection-image').css('border, 10px solid #fff'); 1003 });
1004} 1005 1006/*==================================================== 1007 35: Common Carousel Activation 1008====================================================*/ 1009 1010 var checkData = function (data, value) { 1011 return typeof data === 'undefined' ? value : data; 1012 }; 1013 1014 var $owlCarousel = $('.owl-carousel'); 1015 $owlCarousel.each(function () { 1016 var $t = $(this); 1017 1018 $t.owlCarousel({ 1019 items: checkData( $t.data('owl-items'), 1 ), 1020 margin: checkData( $t.data('owl-margin'), 0 ), 1021 loop: checkData( $t.data('owl-loop'), true ), 1022 smartSpeed: 450, 1023 autoplay: checkData( $t.data('owl-autoplay'), true ), 1024 autoplayTimeout: checkData( $t.data('owl-speed'), 8000 ), 1025 center: checkData( $t.data('owl-center'), false ), 1026 animateOut: checkData( $t.data('owl-animate'), false ), 1027 nav: checkData( $t.data('owl-nav'), false ), 1028 navText: ['<i class="fa fa-angle-left" aria-hidden="true"></i>', '<i class="fa fa-angle-right" aria-hidden="true"></i>'], 1029 dots: checkData( $t.data('owl-dots'), false ), 1030 responsive: checkData( $t.data('owl-responsive'), {} ) 1031 }); 1032 }); 1033/*=================================================== 1034 36: Catagory hover menu 1035===================================================*/ 1036 1037$('.catagory-button .up-arro').on('click', function(){ 1038 $('.hover-catagory-menu').slideUp(400); 1039 $('.down-arro').css('display','inline-block'); 1040 $('.up-arro').css('display','none'); 1041}) 1042 1043$('.catagory-button .down-arro').on('click', function(){ 1044 $('.hover-catagory-menu').slideDown(400); 1045 $('.down-arro').css('display','none'); 1046 $('.up-arro').css('display','inline-block'); 1047}) 1048 1049$('.catagory-button .up-arro , .catagory-button .down-arro ').on('click', function(event){ 1050 event.stopPropagation()&&event.preventDefault() 1051}) 1052 1053/*============================================================= 1054 37: modal window 1055=============================================================*/ 1056$(window).on('load', function(){ 1057 if($('.modal-window-container').length !==0){ 1058 setTimeout(function(){ 1059 $('.modal-window-container').addClass('window-show'); 1060 $('body').delay(500).addClass('modal-window-open'); 1061 }, 2000); 1062 } 1063}) 1064 1065function modalfunction(){ 1066 $('.modal-window-close').on('click', function(){ 1067 $('.modal-window-container').removeClass('window-show'); 1068 $('body').removeClass('modal-window-open'); 1069 }) 1070 $('.modal-window-overlay').on('click', function(){ 1071 $(this).fadeTo(1000, 0); 1072 $('.modal-window-content').delay(500).parent().removeClass('window-show'); 1073 $('body').removeClass('modal-window-open'); 1074 }) 1075 1076} 1077modalfunction() 1078 1079 1080/*======================================================= 1081 38: modal quick view slider 1082=======================================================*/ 1083 let $productGallery3 = $('.quick-product-gallery'), 1084 $productThumbs3 = $('.quick-product-thumbs'); 1085 1086 if ( $productGallery3.length ) { 1087 let productPreview = new Swiper($productGallery3, { 1088 spaceBetween: 1, 1089 touchRatio: 0, 1090 effect: 'fade', 1091 pagination: { 1092 el: '.product-gallery-pagination', 1093 clickable: true, 1094 } 1095 }); 1096 1097 let productThumbs = new Swiper($productThumbs3, { 1098 spaceBetween: 10, 1099 slidesPerView: 4, 1100 slideToClickedSlide: true 1101 }); 1102 1103 $productThumbs3.on('click','.swiper-slide', function (event) { 1104 let $t = $(this); 1105 productPreview.slideTo( $t.index()); 1106 $t.addClass('active swiper-slide-active').siblings().removeClass('active swiper-slide-active'); 1107 }); 1108 1109 }; 1110 1111 1112$('.quick_view').on('click', function(event){ 1113 event.preventDefault(); 1114 $('.modal-quickview-container').addClass('show'); 1115 $('.modal-window-overlay').css('opacity',1); 1116 $('body').delay(500).addClass('modal-window-open'); 1117}) 1118 1119$('.modal-window-close').on('click', function(){ 1120 $('.modal-quickview-container').removeClass('show'); 1121 $('body').delay(500).removeClass('modal-window-open'); 1122}) 1123$('.modal-window-overlay').on('click', function(){
1124 $(this).delay(500).parents('.modal-quickview-container').removeClass('show'); 1125 $('body').delay(500).removeClass('modal-window-open'); 1126 }) 1127 1128/*====================================================================== 1129 39: cart list remover 1130======================================================================*/ 1131$('.product-remove .remover-field').on('click', function(){ 1132 $(this).parents('.cart_item').fadeOut(300) 1133 }) 1134/*====================================================================== 1135 40: cart list incriment/ product increment 1136======================================================================*/ 1137 $('.product-quantity .plus').on('click',function(){ 1138 var $qty=$(this).parent().find('input'); 1139 var currentVal = parseInt($qty.val()); 1140 if (!isNaN(currentVal)) { 1141 $qty.val(currentVal + 1); 1142 } 1143}); 1144$('.product-quantity .minus').on('click',function(){ 1145 var $qty=$(this).parent().find('input'); 1146 var currentVal = parseInt($qty.val()); 1147 if (!isNaN(currentVal) && currentVal > 1) { 1148 $qty.val(currentVal - 1); 1149 } 1150}); 1151 1152 /* ============================================ 1153 41: Search bar input text 1154 ============================================ */ 1155 $('.search-page .theme-input-style').on('keyup', function(){ 1156 $('#search-key').text($(this).val()) 1157 }); 1158/*================================================== 1159 42: Wish list and add to cart ontifaction 1160==================================================*/ 1161 $( '.add-to-bag, .addto-icon-btn a, .wishlist-icon-btn a, wish-list, .main-menu-btn a' ).on('click', function(e){ 1162 e.preventDefault(); 1163 }); 1164 1165 $('.add-to-bag, .addto-icon-btn a').on('click', function(e){ 1166 $('.modal-add-notifacition').fadeTo(300, 1); 1167 e.preventDefault(); 1168 $('.modal-add-notifacition').css({'opacity': "1", "visibility":"visible"}).delay(2000).fadeTo(300, 0); 1169 }); 1170 1171 1172 1173 $('.wish-list, .wishlist-icon-btn a').on('click', function(e){ 1174 $('.modal-wish-notifacition').fadeTo(300, 1); 1175 e.preventDefault(); 1176 $('.modal-wish-notifacition').css({'opacity': "1", "visibility":"visible"}).delay(2000).fadeTo(300, 0); 1177 }) 1178 1179 /*=========================================== 1180 43: title Text animation 1181 ===========================================*/ 1182 $(window).on('load', function(){ 1183 if( $(window).width() >= 991 ){ 1184 var $animateEl = $('.section-title span'); 1185 $animateEl.each(function () { 1186 var $el = $(this); 1187 $el.waypoint(function () { 1188 TweenMax.to($el, 2, {left:"68%", ease:Linear.easeOut, delay:0}); 1189 }, {offset: '1000'}); 1190 }); 1191 } 1192 }) 1193 1194/*================================================== 1195 44: Coming soon animation home4 1196==================================================*/ 1197$('.coming-animation').each(function(){ 1198 $(this).html($(this).text().replace(/([^\x00-\x80]|\w)/g, "<span class='letter'>$&</span>")); 1199 }); 1200 $('.collection-animation').each(function(){ 1201 $(this).html($(this).text().replace(/([^\x00-\x80]|\w)/g, "<span class='letter'>$&</span>")); 1202 }); 1203 1204 anime.timeline({loop: true}) 1205 .add({ 1206 targets: '.coming-animation .letter', 1207 opacity: [0,1], 1208 easing: "easeInOutQuad", 1209 duration: 2250, 1210 delay: function(el, i) { 1211 return 150 * (i+1) 1212 } 1213 }).add({ 1214 targets: '.coming-animation', 1215 targets: '.ml3', 1216 opacity: 0, 1217 duration: 1000, 1218 easing: "easeOutExpo", 1219 delay: 1000 1220 }); 1221 1222 // collection text animation 1223 $('.caregoris-animation').on('mouseenter', function(){ 1224 anime.timeline({loop: true}) 1225 .add({ 1226 targets: '.collection-animation .letter', 1227 opacity: [0,1], 1228 easing: "easeInOutQuad", 1229 duration: 2250, 1230 delay: function(el, i) { 1231 return 150 * (i+1) 1232 } 1233 }).add({ 1234 targets: '.collection-animation', 1235 targets: '.ml3', 1236 opacity: 0, 1237 duration: 1000, 1238 easing: "easeOutExpo", 1239 delay: 1000 1240 }); 1241 }) 1242 1243 1244 1245})(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.