1/*************************************************** 2==================== JS INDEX ====================== 3**************************************************** 401. PreLoader Js 502. Mobile Menu Js 603. Sidebar Js 704. Cart Toggle Js 805. Search Js 906. Sticky Header Js 1007. Data Background Js 1108. Nice Select Js 1209. slider__active Slider Js 1310. Masonary Js 1411. Popup js 1512. Wow Js 1613. Data width Js 1714. Cart Quantity Js 1815. Show Login Toggle Js 1916. Show Coupon Toggle Js 2017. Create An Account Toggle Js 2118. Shipping Box Toggle Js 2219. Counter Js 2320. Parallax Js 2421. InHover Active Js 2522. brand activation 2623. testimonial activation 2724. feedback activation 2825. category-active 2926. gallery-active 3027. init Isotope 3128. user-btn-active 3229. calender 3330. text-notice 3431. category-menu 3532. drop-btn 36 37****************************************************/ 38 39(function ($) { 40 ("use strict"); 41 42 var windowOn = $(window); 43 //////////////////////////////////////////////////// 44 // 01. PreLoader Js 45 windowOn.on("load", function () { 46 $("#loading").fadeOut(500); 47 }); 48 49 //////////////////////////////////////////////////// 50 // 02. Mobile Menu Js 51 $("#mobile-menu").meanmenu({ 52 meanMenuContainer: ".mobile-menu", 53 meanScreenWidth: "1199", 54 meanExpand: ['<i class="fal fa-plus"></i>'], 55 }); 56 57 // 03. Sidebar Js 58 59 $(".side-info-close,.offcanvas-overlay").on("click", function () { 60 $(".side-info").removeClass("info-open"); 61 $(".offcanvas-overlay").removeClass("overlay-open"); 62 }); 63 $(".side-toggle").on("click", function () { 64 $(".side-info").addClass("info-open"); 65 $(".offcanvas-overlay").addClass("overlay-open"); 66 }); 67 68 //////////////////////////////////////////////////// 69 // 04. Cart Toggle Js 70 $(".cart-toggle-btn").on("click", function () { 71 $(".cartmini__wrapper").addClass("opened"); 72 $(".body-overlay").addClass("opened"); 73 }); 74 $(".cartmini__close-btn").on("click", function () { 75 $(".cartmini__wrapper").removeClass("opened"); 76 $(".body-overlay").removeClass("opened"); 77 }); 78 $(".body-overlay").on("click", function () { 79 $(".cartmini__wrapper").removeClass("opened"); 80 $(".sidebar__area").removeClass("sidebar-opened"); 81 $(".header__search-3").removeClass("search-opened"); 82 $(".body-overlay").removeClass("opened"); 83 }); 84 85 //////////////////////////////////////////////////// 86 // 05. Search Js 87 $(".search-toggle").on("click", function () { 88 $(".search__area").addClass("opened"); 89 }); 90 $(".search-close-btn").on("click", function () { 91 $(".search__area").removeClass("opened"); 92 }); 93 94 //////////////////////////////////////////////////// 95 // 06. Sticky Header Js 96 windowOn.on("scroll", function () { 97 var scroll = $(window).scrollTop(); 98 if (scroll < 100) { 99 $(".sticky-header").removeClass("sticky"); 100 } else { 101 $(".sticky-header").addClass("sticky"); 102 } 103 }); 104 105 //////////////////////////////////////////////////// 106 // 07. Data Background Js 107 $("[data-background").each(function () { 108 $(this).css( 109 "background-image", 110 "url( " + $(this).attr("data-background") + " )" 111 ); 112 }); 113 114 //////////////////////////////////////////////////// 115 // 08. Nice Select Js 116 $("select").niceSelect(); 117 118 //////////////////////////////////////////////////// 119 // 09. slider__active Slider Js 120 121 if (jQuery(".slider__active").length > 0) { 122 let sliderActive1 = ".slider__active"; 123 let sliderInit1 = new Swiper(sliderActive1, { 124 // Optional parameters 125 slidesPerView: 1, 126 slidesPerColumn: 1, 127 paginationClickable: true, 128 loop: true, 129 effect: "fade", 130 131 autoplay: { 132 delay: 5000, 133 }, 134 135 // If we need pagination 136 pagination: { 137 el: ".swiper-paginations", 138 // dynamicBullets: true, 139 clickable: true, 140 }, 141 142 // Navigation arrows 143 navigation: { 144 nextEl: ".swiper-button-next", 145 prevEl: ".swiper-button-prev", 146 }, 147 148 a11y: false, 149 }); 150 151 function animated_swiper(selector, init) { 152 let animated = function animated() { 153 $(selector + " [data-animation]").each(function () { 154 let anim = $(this).data("animation"); 155 let delay = $(this).data("delay"); 156 let duration = $(this).data("duration"); 157 158 $(this) 159 .removeClass("anim" + anim) 160 .addClass(anim + " animated") 161 .css({ 162 webkitAnimationDelay: delay, 163 animationDelay: delay, 164 webkitAnimationDuration: duration, 165 animationDuration: duration, 166 }) 167 .one( 168 "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", 169 function () { 170 $(this).removeClass(anim + " animated"); 171 } 172 ); 173 }); 174 }; 175 animated(); 176 // Make animated when slide change 177 init.on("slideChange", function () { 178 $(sliderActive1 + " [data-animation]").removeClass("animated"); 179 }); 180 init.on("slideChange", animated); 181 } 182 183 animated_swiper(sliderActive1, sliderInit1); 184 } 185
186 if (jQuery(".slider__active-2").length > 0) { 187 let sliderActive1 = ".slider__active-2"; 188 let sliderInit1 = new Swiper(sliderActive1, { 189 // Optional parameters 190 slidesPerView: 1, 191 slidesPerColumn: 1, 192 paginationClickable: true, 193 loop: true, 194 effect: "fade", 195 196 autoplay: { 197 delay: 5000, 198 }, 199 200 // If we need pagination 201 pagination: { 202 el: ".swiper-paginations", 203 // dynamicBullets: true, 204 clickable: true, 205 }, 206 207 // Navigation arrows 208 navigation: { 209 nextEl: ".swiper-button-next", 210 prevEl: ".swiper-button-prev", 211 }, 212 213 a11y: false, 214 }); 215 216 function animated_swiper(selector, init) { 217 let animated = function animated() { 218 $(selector + " [data-animation]").each(function () { 219 let anim = $(this).data("animation"); 220 let delay = $(this).data("delay"); 221 let duration = $(this).data("duration"); 222 223 $(this) 224 .removeClass("anim" + anim) 225 .addClass(anim + " animated") 226 .css({ 227 webkitAnimationDelay: delay, 228 animationDelay: delay, 229 webkitAnimationDuration: duration, 230 animationDuration: duration, 231 }) 232 .one( 233 "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", 234 function () { 235 $(this).removeClass(anim + " animated"); 236 } 237 ); 238 }); 239 }; 240 animated(); 241 // Make animated when slide change 242 init.on("slideChange", function () { 243 $(sliderActive1 + " [data-animation]").removeClass("animated"); 244 }); 245 init.on("slideChange", animated); 246 } 247 248 animated_swiper(sliderActive1, sliderInit1); 249 } 250 251 var themeSlider = new Swiper(".classname", { 252 slidesPerView: 1, 253 spaceBetween: 30, 254 loop: true, 255 pagination: { 256 el: ".swiper-pagination", 257 clickable: true, 258 }, 259 breakpoints: { 260 1200: { 261 slidesPerView: 6, 262 }, 263 992: { 264 slidesPerView: 5, 265 }, 266 768: { 267 slidesPerView: 3, 268 }, 269 576: { 270 slidesPerView: 2, 271 }, 272 0: { 273 slidesPerView: 2, 274 }, 275 }, 276 }); 277 278 //////////////////////////////////////////////////// 279 // 10. Masonary Js 280 $(".portfolio-active").imagesLoaded(function () { 281 // init Isotope 282 var $grid = $(".grid").isotope({ 283 itemSelector: ".grid-item", 284 percentPosition: true, 285 masonry: { 286 // use outer width of grid-sizer for columnWidth 287 columnWidth: 1, 288 }, 289 }); 290 291 // filter items on button click 292 $(".portfolio-active").on("click", "button", function () { 293 var filterValue = $(this).attr("data-filter"); 294 $grid.isotope({ filter: filterValue }); 295 }); 296 297 //for menu active class 298 $(".masonary-menu button").on("click", function (event) { 299 $(this).siblings(".active").removeClass("active"); 300 $(this).addClass("active"); 301 event.preventDefault(); 302 }); 303 }); 304 305 // 11. Popup js 306 /* magnificPopup img view */ 307 $(".image-popups").magnificPopup({ 308 type: "image", 309 gallery: { 310 enabled: true, 311 }, 312 }); 313 314 /* magnificPopup video view */ 315 $(".popup-video").magnificPopup({ 316 type: "iframe", 317 }); 318 319 //////////////////////////////////////////////////// 320 // 12. Wow Js 321 new WOW().init(); 322 323 //////////////////////////////////////////////////// 324 // 13. Data width Js 325 $("[data-width]").each(function () { 326 $(this).css("width", $(this).attr("data-width")); 327 }); 328 329 //////////////////////////////////////////////////// 330 // 14. Cart Quantity Js 331 $(".cart-minus").click(function () { 332 var $input = $(this).parent().find("input"); 333 var count = parseInt($input.val()) - 1; 334 count = count < 1 ? 1 : count; 335 $input.val(count); 336 $input.change(); 337 return false; 338 }); 339 $(".cart-plus").click(function () { 340 var $input = $(this).parent().find("input"); 341 $input.val(parseInt($input.val()) + 1); 342 $input.change(); 343 return false; 344 }); 345 346 //////////////////////////////////////////////////// 347 // 15. Show Login Toggle Js 348 $("#showlogin").on("click", function () { 349 $("#checkout-login").slideToggle(700); 350 }); 351 352 353 //////////////////////////////////////////////////// 354 // 16. Show Coupon Toggle Js 355 $("#showcoupon").on("click", function () { 356 $("#checkout_coupon").slideToggle(700); 357 }); 358 359 //////////////////////////////////////////////////// 360 // 17. Create An Account Toggle Js 361 $("#cbox").on("click", function () { 362 $("#cbox_info").slideToggle(700); 363 }); 364 365 //////////////////////////////////////////////////// 366 // 18. Shipping Box Toggle Js 367 $("#ship-box").on("click", function () { 368 $("#ship-box-info").slideToggle(700); 369 }); 370 371 //////////////////////////////////////////////////// 372 // 19. Counter Js 373 $(".counter").counterUp({ 374 delay: 10, 375 time: 1000, 376 }); 377 378 //////////////////////////////////////////////////// 379 // 20. Parallax Js 380 if ($(".scene").length > 0) {
381 $(".scene").parallax({ 382 scalarX: 10.0, 383 scalarY: 15.0, 384 }); 385 } 386 387 //////////////////////////////////////////////////// 388 // 21. InHover Active Js 389 $(".hover__active").on("mouseenter", function () { 390 $(this) 391 .addClass("active") 392 .parent() 393 .siblings() 394 .find(".hover__active") 395 .removeClass("active"); 396 }); 397 398 if (typeof $.fn.knob != "undefined") { 399 $(".knob").each(function () { 400 var $this = $(this), 401 knobVal = $this.attr("data-rel"); 402 403 $this.knob({ 404 draw: function () { 405 $(this.i).val(this.cv + "%"); 406 }, 407 }); 408 409 $this.appear( 410 function () { 411 $({ 412 value: 0, 413 }).animate( 414 { 415 value: knobVal, 416 }, 417 { 418 duration: 2000, 419 easing: "swing", 420 step: function () { 421 $this 422 .val(Math.ceil(this.value)) 423 .trigger("change"); 424 }, 425 } 426 ); 427 }, 428 { 429 accX: 0, 430 accY: -150, 431 } 432 ); 433 }); 434 } 435 436 // 22. brand activation 437 const brand = new Swiper(".brand-active", { 438 // Default parameters 439 slidesPerView: 1, 440 spaceBetween: 10, 441 loop: true, 442 autoplay: { 443 delay: 3000, 444 }, 445 // Responsive breakpoints 446 breakpoints: { 447 // when window width is >= 320px 448 320: { 449 slidesPerView: 1, 450 spaceBetween: 20, 451 }, 452 // when window width is >= 480px 453 480: { 454 slidesPerView: 2, 455 spaceBetween: 30, 456 }, 457 // when window width is >= 640px 458 640: { 459 slidesPerView: 3, 460 spaceBetween: 40, 461 }, 462 991: { 463 slidesPerView: 4, 464 spaceBetween: 40, 465 }, 466 1200: { 467 slidesPerView: 5, 468 spaceBetween: 40, 469 }, 470 1400: { 471 slidesPerView: 6, 472 spaceBetween: 40, 473 }, 474 }, 475 }); 476 477 // brand activation 478 const relproduct = new Swiper(".r-product-active", { 479 // Default parameters 480 slidesPerView: 1, 481 spaceBetween: 10, 482 loop: true, 483 autoplay: { 484 delay: 3000, 485 }, 486 // Responsive breakpoints 487 breakpoints: { 488 // when window width is >= 320px 489 320: { 490 slidesPerView: 1, 491 spaceBetween: 20, 492 }, 493 // when window width is >= 480px 494 480: { 495 slidesPerView: 2, 496 spaceBetween: 30, 497 }, 498 // when window width is >= 640px 499 640: { 500 slidesPerView: 2, 501 spaceBetween: 40, 502 }, 503 991: { 504 slidesPerView: 3, 505 spaceBetween: 40, 506 }, 507 1200: { 508 slidesPerView: 4, 509 spaceBetween: 40, 510 }, 511 1400: { 512 slidesPerView: 5, 513 spaceBetween: 40, 514 }, 515 }, 516 }); 517 518 // 23. testimonial activation 519 const testimonial = new Swiper(".testimonial-active", { 520 // Default parameters 521 slidesPerView: 1, 522 spaceBetween: 30, 523 loop: true, 524 autoplay: { 525 delay: 3000, 526 }, 527 pagination: { 528 el: ".testimonial-pagination", 529 clickable: true, 530 }, 531 // Responsive breakpoints 532 breakpoints: { 533 // when window width is >= 320px 534 320: { 535 slidesPerView: 1, 536 spaceBetween: 20, 537 }, 538 // when window width is >= 480px 539 480: { 540 slidesPerView: 1, 541 spaceBetween: 30, 542 }, 543 // when window width is >= 640px 544 640: { 545 slidesPerView: 1, 546 spaceBetween: 40, 547 }, 548 // when window width is >= 640px 549 991: { 550 slidesPerView: 2, 551 spaceBetween: 40, 552 }, 553 1200: { 554 slidesPerView: 3, 555 spaceBetween: 40, 556 }, 557 1400: { 558 slidesPerView: 3, 559 // spaceBetween: 40 560 }, 561 }, 562 }); 563 564 // 24. feedback activation 565 const feedback = new Swiper(".feedback-active", { 566 // Default parameters 567 slidesPerView: 1, 568 spaceBetween: 30, 569 loop: true, 570 autoplay: { 571 delay: 3000, 572 }, 573 pagination: { 574 el: ".feedback-pagination", 575 clickable: false, 576 }, 577 // Responsive breakpoints 578 breakpoints: { 579 // when window width is >= 320px 580 320: { 581 slidesPerView: 1, 582 spaceBetween: 20, 583 }, 584 // when window width is >= 480px 585 480: { 586 slidesPerView: 1, 587 spaceBetween: 30, 588 }, 589 // when window width is >= 640px 590 640: { 591 slidesPerView: 1, 592 spaceBetween: 40, 593 }, 594 // when window width is >= 640px 595 991: { 596 slidesPerView: 1, 597 spaceBetween: 40, 598 }, 599 1200: { 600 slidesPerView: 1, 601 spaceBetween: 40, 602 }, 603 1400: { 604 slidesPerView: 1, 605 // spaceBetween: 40 606 }, 607 }, 608 }); 609 610 // 25. category-active 611 const category = new Swiper(".category-active", { 612 // Default parameters 613 slidesPerView: 1, 614 spaceBetween: 15, 615 loop: true, 616 autoplay: { 617 delay: 3000, 618 }, 619 pagination: { 620 el: ".category-pagination", 621 clickable: true, 622 }, 623 // Navigation arrows 624 navigation: { 625 nextEl: ".category-button-next", 626 prevEl: ".category-button-prev", 627 }, 628 // Responsive breakpoints 629 breakpoints: { 630 // when window width is >= 320px 631 320: { 632 slidesPerView: 1, 633 spaceBetween: 15, 634 }, 635 // when window width is >= 480px 636 480: { 637 slidesPerView: 1, 638 spaceBetween: 15, 639 }, 640 // when window width is >= 640px 641 640: { 642 slidesPerView: 2, 643 spaceBetween: 15, 644 }, 645 // when window width is >= 640px 646 991: { 647 slidesPerView: 3, 648 spaceBetween: 15, 649 }, 650 1200: { 651 slidesPerView: 3, 652 spaceBetween: 15, 653 }, 654 1400: { 655 slidesPerView: 5, 656 // spaceBetween: 40 657 }, 658 }, 659 }); 660 661 // 26. gallery-active 662 const gallery = new Swiper(".gallery-active", { 663 // Default parameters 664 slidesPerView: 1, 665 spaceBetween: 0, 666 loop: true, 667 autoplay: { 668 delay: 3000, 669 }, 670 pagination: { 671 el: "gallery-pagination", 672 clickable: false, 673 }, 674 // Navigation arrows 675 navigation: { 676 nextEl: ".gallery-button-next", 677 prevEl: ".gallery-button-prev", 678 }, 679 // Responsive breakpoints 680 breakpoints: { 681 // when window width is >= 320px 682 320: { 683 slidesPerView: 1, 684 // spaceBetween: 20 685 }, 686 // when window width is >= 480px 687 480: { 688 slidesPerView: 2, 689 // spaceBetween: 30 690 }, 691 // when window width is >= 640px 692 640: { 693 slidesPerView: 3, 694 // spaceBetween: 40 695 }, 696 // when window width is >= 640px 697 991: { 698 slidesPerView: 4, 699 // spaceBetween: 40 700 }, 701 1200: { 702 slidesPerView: 4, 703 // spaceBetween: 40 704 }, 705 1400: { 706 slidesPerView: 5, 707 // spaceBetween: 40 708 }, 709 }, 710 }); 711 712 // 27. init Isotope 713 $(".grid").imagesLoaded(function () { 714 var $grid = $(".grid").isotope({ 715 // options 716 layoutMode: "fitRows", 717 }); 718 // filter items on button click 719 $(".portfolio-button").on("click", "button", function () { 720 var filterValue = $(this).attr("data-filter"); 721 $grid.isotope({ filter: filterValue });
722 }); 723 724 //for menu active class 725 $(".portfolio-button button").on("click", function (event) { 726 $(this).siblings(".active").removeClass("active"); 727 $(this).addClass("active"); 728 event.preventDefault(); 729 }); 730 }); 731 732 // 28. user-btn-active 733 734 $(".user-btn-sign-in").on("click", function () { 735 $(".signin-area").addClass("open"); 736 $(".offcanvas-overlay").addClass("overlay-open"); 737 }); 738 $(".offcanvas-overlay").on("click", function () { 739 $(".signin-area").removeClass("open"); 740 $(".signup-area").removeClass("open"); 741 $(".offcanvas-overlay").removeClass("overlay-open"); 742 }); 743 744 $(".user-btn-sign-up").on("click", function () { 745 $(".signup-area").addClass("open"); 746 $(".offcanvas-overlay").addClass("overlay-open"); 747 }); 748 749 // 29. calender 750 if (jQuery(".myCalendar").length > 0) { 751 $(".myCalendar") 752 .huicalendar({ 753 viewDay: new Date("2022/03/19"), 754 }) 755 .on("changeMonth", function (e) { 756 console.log(e.year); 757 console.log(e.month); 758 $(this).huicalendar( 759 { 760 enabledDay: [19], 761 viewDay: new Date(e.year + "/" + e.month + "/01"), 762 }, 763 "update" 764 ); 765 }); 766 } 767 768 // 30. text-notice 769 $(".eduman-header-notice-action-close button").on("click", function () { 770 $(".header-note-area").addClass("eduman-header-notice-hide"); 771 }); 772 773 // 31. category-menu 774 $(".cattext").on("click", function () { 775 $(".cattext").toggleClass("showCategory"); 776 }); 777 778 jQuery("body").on("click", function (e) { 779 if ($(e.target).is(".cattext")) { 780 return; 781 } 782 if ($(".cattext.showCategory").length > 0) { 783 $(".cattext").removeClass("showCategory"); 784 } 785 }); 786 787 // 32. drop-btn 788 $(".drop-btn").on("click", function () { 789 $(this).parent("").toggleClass("content-hidden"); 790 }); 791 792 $(".wishlist-btn").on("click", function () { 793 $(this).toggleClass("w-added"); 794 }); 795 796 // follow btn 797 $(".edu-follow-btn").click(function () { 798 $(this).toggleClass("followed"); 799 if ($(".edu-follow-btn").hasClass("followed")) { 800 $(this).html("followed"); 801 } else { 802 $(this).html("follow"); 803 } 804 }); 805 806 $("#show-review-box").on("click", function () { 807 $("#review-box").slideToggle(700); 808 }); 809 810})(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.