1(function($) { 2 "use strict"; 3 4 // ========================================== 5 // Start Document Ready function 6 // ========================================== 7 $(document).ready(function() { 8 9 10 // ============================== Light & Dark Mode Js End============================== 11 12 // ============== Mobile Menu Sidebar Js Start ======== 13 $('.toggle-mobileMenu').on('click', function() { 14 $('.mobile-menu').addClass('active'); 15 $('.side-overlay').addClass('show'); 16 $('body').addClass('scroll-hide-sm'); 17 }); 18 19 $('.close-button, .side-overlay').on('click', function() { 20 $('.mobile-menu').removeClass('active'); 21 $('.side-overlay').removeClass('show'); 22 $('body').removeClass('scroll-hide-sm'); 23 }); 24 // ============== Mobile Menu Sidebar Js End ======== 25 26 27 // ============== Mobile Nav Menu Dropdown Js Start ======================= 28 var windowWidth = $(window).width(); 29 30 $('.has-submenu').on('click', function() { 31 var thisItem = $(this); 32 33 if (windowWidth < 992) { 34 if (thisItem.hasClass('active')) { 35 thisItem.removeClass('active') 36 } else { 37 $('.has-submenu').removeClass('active') 38 $(thisItem).addClass('active') 39 } 40 41 var submenu = thisItem.find('.nav-submenu'); 42 43 $('.nav-submenu').not(submenu).slideUp(300); 44 submenu.slideToggle(300); 45 } 46 47 }); 48 49 // ============================== Light & Dark Mode Js Start===================== 50 const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]'); 51 const currentTheme = localStorage.getItem('theme'); 52 53 if (currentTheme) { 54 document.documentElement.setAttribute('data-theme', currentTheme); 55 56 if (currentTheme === 'dark') { 57 toggleSwitch.checked = true; 58 } 59 } 60 function switchTheme(e) { 61 if (e.target.checked) { 62 document.documentElement.setAttribute('data-theme', 'dark'); 63 localStorage.setItem('theme', 'dark'); 64 } 65 else { 66 document.documentElement.setAttribute('data-theme', 'light'); 67 localStorage.setItem('theme', 'light'); 68 } 69 } 70 toggleSwitch.addEventListener('change', switchTheme, false); 71 // ============================== Light & Dark Mode Js End============================== 72 73 // ========================== add active class to ul>li top Active current page Js Start ===================== 74 function dynamicActiveMenuClass(selector) { 75 let FileName = window.location.pathname.split("/").reverse()[0]; 76 77 selector.find("li").each(function() { 78 let anchor = $(this).find("a"); 79 if ($(anchor).attr("href") == FileName) { 80 $(this).addClass("activePage"); 81 } 82 }); 83 // if any li has activePage element add class 84 selector.children("li").each(function() { 85 if ($(this).find(".activePage").length) { 86 $(this).addClass("activePage"); 87 } 88 }); 89 // if no file name return 90 if ("" == FileName) { 91 selector.find("li").eq(0).addClass("activePage"); 92 } 93 } 94 if ($('ul').length) { 95 dynamicActiveMenuClass($('ul')); 96 } 97 // ========================== add active class to ul>li top Active current page Js End ===================== 98 99 // ================================ Remove Sale Offer Js Start ============================= 100 $('.sale-offer__close').on('click', function() { 101 $(this).closest('.sale-offer').addClass('d-none') 102 }); 103 // ================================ Remove Sale Offer Js End ============================= 104 105 // ================================ CountDown Js Start ============================= 106 if (document.querySelector('.countdown')) { 107 const myCountdown = new countdown({ 108 target: '.countdown', 109 dayWord: ' Days:', 110 hourWord: ' Hour: ', 111 minWord: ' Min:', 112 secWord: ' Sec:' 113 }); 114 } 115 // ================================ CountDown Js End ============================= 116 117 // ========================= popular Category Js Start ============== 118 $('.popular-slider').slick({ 119 slidesToShow: 6, 120 slidesToScroll: 1, 121 autoplay: true, 122 autoplaySpeed: 2000, 123 speed: 1500, 124 dots: false, 125 pauseOnHover: true, 126 arrows: true, 127 draggable: true, 128 speed: 900, 129 infinite: true, 130 prevArrow: '<button type="button" class="slick-prev"><i class="las la-arrow-left"></i></button>', 131 nextArrow: '<button type="button" class="slick-next"><i class="las la-arrow-right"></i></button>', 132 responsive: [{ 133 breakpoint: 1199, 134 settings: { 135 slidesToShow: 5, 136 } 137 }, 138 { 139 breakpoint: 991, 140 settings: { 141 slidesToShow: 4, 142 } 143 }, 144 { 145 breakpoint: 767, 146 settings: { 147 slidesToShow: 3, 148 } 149 }, 150 { 151 breakpoint: 575, 152 settings: { 153 slidesToShow: 2, 154 } 155 }, 156 ] 157 }); 158 // ========================= popular Category Js End =================== 159 160 // ========================= Wishlist Js Start =================== 161 $('.product-card__wishlist').on('click', function() { 162 $(this).toggleClass('active') 163 }); 164 // ========================= Wishlist Js End =================== 165 166 // ========================= Selling Product Js Start ============== 167 $('.selling-product-slider').slick({ 168 slidesToShow: 3, 169 slidesToScroll: 1, 170 autoplay: true, 171 autoplaySpeed: 2000, 172 speed: 1500, 173 dots: true, 174 pauseOnHover: true, 175 arrows: true, 176 draggable: true, 177 speed: 900, 178 infinite: true, 179 prevArrow: '<button type="button" class="slick-prev"><i class="las la-arrow-left"></i></button>', 180 nextArrow: '<button type="button" class="slick-next"><i class="las la-arrow-right"></i></button>', 181 responsive: [{ 182 breakpoint: 991, 183 settings: { 184 slidesToShow: 2, 185 } 186 }, 187 { 188 breakpoint: 767, 189 settings: { 190 slidesToShow: 2, 191 } 192 }, 193 { 194 breakpoint: 575, 195 settings: { 196 slidesToShow: 1, 197 } 198 }, 199 ] 200 }); 201 // ========================= Selling Product Js End =================== 202 203 // ========================= Testimonial Slider Js Start ============== 204 $('.testimonial-slider').slick({ 205 slidesToShow: 2, 206 slidesToScroll: 1, 207 autoplay: true, 208 autoplaySpeed: 2000, 209 speed: 1500, 210 dots: true, 211 pauseOnHover: true, 212 arrows: true, 213 draggable: true, 214 speed: 900, 215 infinite: true, 216 prevArrow: '<button type="button" class="slick-prev"><i class="las la-arrow-left"></i></button>', 217 nextArrow: '<button type="button" class="slick-next"><i class="las la-arrow-right"></i></button>', 218 responsive: [{ 219 breakpoint: 991, 220 settings: { 221 slidesToShow: 1, 222 } 223 }, ] 224 }); 225 // ========================= Testimonial Slider Js End =================== 226 227 // ========================= Selling Product Js Start ============== 228 $('.resource-slider').slick({ 229 slidesToShow: 4, 230 slidesToScroll: 1, 231 autoplay: true, 232 autoplaySpeed: 2000, 233 speed: 1500, 234 dots: true, 235 pauseOnHover: true, 236 arrows: true, 237 draggable: true, 238 speed: 900, 239 infinite: true, 240 prevArrow: '<button type="button" class="slick-prev"><i class="las la-arrow-left"></i></button>', 241 nextArrow: '<button type="button" class="slick-next"><i class="las la-arrow-right"></i></button>', 242 responsive: [{ 243 breakpoint: 1199, 244 settings: { 245 slidesToShow: 3, 246 } 247 }, 248 { 249 breakpoint: 991, 250 settings: { 251 slidesToShow: 2, 252 } 253 }, 254 { 255 breakpoint: 575, 256 settings: { 257 slidesToShow: 1, 258 } 259 }, 260 ] 261 }); 262 // ========================= Selling Product Js End =================== 263 264 // ========================= Brand Slider Js Start ============== 265 $('.brand-slider').slick({ 266 slidesToShow: 5, 267 slidesToScroll: 1, 268 autoplay: true, 269 autoplaySpeed: 2000, 270 speed: 1500, 271 dots: false, 272 pauseOnHover: true,
273 arrows: false, 274 draggable: true, 275 speed: 900, 276 infinite: true, 277 prevArrow: '<button type="button" class="slick-prev"><i class="las la-arrow-left"></i></button>', 278 nextArrow: '<button type="button" class="slick-next"><i class="las la-arrow-right"></i></button>', 279 responsive: [{ 280 breakpoint: 1199, 281 settings: { 282 slidesToShow: 4, 283 } 284 }, 285 { 286 breakpoint: 991, 287 settings: { 288 slidesToShow: 4, 289 } 290 }, 291 { 292 breakpoint: 767, 293 settings: { 294 slidesToShow: 3, 295 } 296 }, 297 { 298 breakpoint: 575, 299 settings: { 300 slidesToShow: 2, 301 } 302 }, 303 ] 304 }); 305 // ========================= Brand Slider Js End =================== 306 307 // ========================= Payment Method Slider Js Start ============== 308 $('.payment-method__slider').slick({ 309 slidesToShow: 10, 310 slidesToScroll: 1, 311 autoplay: false, 312 autoplaySpeed: 2000, 313 speed: 1500, 314 dots: false, 315 pauseOnHover: true, 316 arrows: true, 317 draggable: true, 318 speed: 900, 319 infinite: true, 320 prevArrow: '<button type="button" class="slick-prev"><i class="las la-arrow-left"></i></button>', 321 nextArrow: '<button type="button" class="slick-next"><i class="las la-arrow-right"></i></button>', 322 responsive: [{ 323 breakpoint: 1299, 324 settings: { 325 slidesToShow: 8, 326 } 327 }, 328 { 329 breakpoint: 1199, 330 settings: { 331 slidesToShow: 6, 332 } 333 }, 334 { 335 breakpoint: 767, 336 settings: { 337 slidesToShow: 4, 338 } 339 }, 340 { 341 breakpoint: 575, 342 settings: { 343 slidesToShow: 4, 344 } 345 }, 346 { 347 breakpoint: 425, 348 settings: { 349 slidesToShow: 3, 350 } 351 }, 352 ] 353 }); 354 // ========================= Payment Method Slider Js End =================== 355 356 // ========================= Follow Button Js Start ========================== 357 $('.follow-btn').on('click', function() { 358 var buttonText = $(this).text(); 359 $(this).text(buttonText === 'Follow' ? 'Following' : 'Follow'); 360 $(this).toggleClass('active') 361 }); 362 // ========================= Follow Button Js End ========================== 363 364 // ========================= Text Rotation Js Start ========================== 365 const text = document.querySelector(".circle__text"); 366 367 if (text) { 368 text.innerHTML = text.innerText 369 .split("") 370 .map( 371 (char, i) => `<span style="transform:rotate(${i * 11.5}deg)">${char}</span>` 372 ) 373 .join(""); 374 } 375 376 // Text Two 377 const textTwo = document.querySelector(".circle__desc"); 378 379 if (textTwo) { 380 textTwo.innerHTML = textTwo.innerText 381 .split("") 382 .map( 383 (char, i) => `<span style="transform:rotate(${i * 11.5}deg)">${char}</span>` 384 ) 385 .join(""); 386 } 387 // ========================= Text Rotation Js End ========================== 388 389 // ========================= Counter Up Js End =================== 390 // const counterUp = window.counterUp.default; 391 392 // const callback = (entries) => {
393 // entries.forEach((entry) => { 394 // const el = entry.target; 395 // if (entry.isIntersecting && !el.classList.contains('is-visible')) { 396 // counterUp(el, { 397 // duration: 3500, 398 // delay: 16, 399 // }); 400 // el.classList.add('is-visible'); 401 // } 402 // }); 403 // }; 404 405 // const IO = new IntersectionObserver(callback, { 406 // threshold: 1 407 // }); 408 409 // Banner statistics Counter 410 // const statisticsCounter = document.querySelectorAll('.statistics__amount'); 411 // if (statisticsCounter.length > 0) { 412 // statisticsCounter.forEach((counterNumber) => { 413 // IO.observe(counterNumber); 414 // }); 415 // } 416 417 // performance Count 418 // const performanceCount = document.querySelectorAll('.performance-content__count'); 419 // if (performanceCount.length > 0) { 420 // performanceCount.forEach((counterNumber) => { 421 // IO.observe(counterNumber); 422 // }); 423 // } 424 // ========================= Counter Up Js End =================== 425 426 // ========================= Filter Sidebar Js Start =================== 427 $('.filter-sidebar__button').on('click', function() { 428 $(this).toggleClass('active') 429 $(this).siblings('.filter-sidebar__content').slideToggle(); 430 }); 431 // ========================= Filter Sidebar Js End =================== 432 433 // ========================== Grid & List View Js Start ===================== 434 $('.list-button').on('click', function() { 435 $('body').addClass('list-view'); 436 $(this).addClass('active'); 437 $('.grid-button').removeClass('active'); 438 }); 439 $('.grid-button').on('click', function() { 440 $('body').removeClass('list-view'); 441 $('.list-button').removeClass('active'); 442 $(this).addClass('active'); 443 }); 444 // ========================== Grid & List View Js End ===================== 445 446 // ========================== Filter Form Show hide Js Start ===================== 447 $('.filter-tab__button').on('click', function() { 448 $('.filter-form').slideToggle(); 449 $(this).toggleClass('active'); 450 }); 451 // ========================== Filter Form Show hide Js End ===================== 452 453 // ========================== Filter Sidebar Show hide Js Start ===================== 454 $('.sidebar-btn').on('click', function() { 455 $('.filter-sidebar').addClass('show'); 456 $('.side-overlay').addClass('show'); 457 $('body').addClass('scroll-hide-sm'); 458 }); 459 $('.filter-sidebar__close, .side-overlay').on('click', function() { 460 $('.filter-sidebar').removeClass('show'); 461 $('.side-overlay').removeClass('show'); 462 $('body').removeClass('scroll-hide-sm'); 463 }); 464 // ========================== Filter Sidebar Show hide Js End ===================== 465 466 // ========================= Social Share Js Start =========================== 467 $('.social-share__button').on('click', function(event) { 468 event.stopPropagation(); 469 $('.social-share__icons').toggleClass('show') 470 }); 471 472 $('body').on('click', function(event) { 473 $('.social-share__icons').removeClass('show') 474 }); 475 476 // For device width size js start 477 // let screenSize = screen.width 478 // alert(' Your Screen Size is: ' + screenSize + 'pixel'); 479 // For device width size js start 480 481 let socialShareBtn = $('.social-share'); 482 // Check if the element exists 483 if (socialShareBtn.length > 0) { 484 let leftDistance = socialShareBtn.offset().left; 485 let rightDistance = $(window).width() - (leftDistance + socialShareBtn.outerWidth()); 486 487 if (leftDistance < rightDistance) { 488 $('.social-share__icons').addClass('left'); 489 } 490 } 491 // ========================= Social Share Js End =========================== 492 493 // ========================= License Dropdown Js Start =========================== 494 $('.btn-has-dropdown').on('click', function(event) { 495 event.stopPropagation(); 496 $('.license-dropdown').toggleClass('active'); 497 }); 498 499 $('.license-dropdown').on('click', function(event) { 500 event.stopPropagation(); 501 }); 502 503 $('body').on('click', function() { 504 $('.license-dropdown').removeClass('active'); 505 }); 506 // ========================= License Dropdown Js End =========================== 507 508 509 // ========================== Increment & Decrement Js Start ===================== 510 $(function() { 511 $('[data-decrease]').click(decrease); 512 $('[data-increase]').click(increase); 513 $('[data-value]').on('change input', valueChange); 514 }); 515 516 function decrease() { 517 var value = $(this).parent().find('[data-value]').val(); 518 if (value > 1) { 519 value--; 520 $(this).parent().find('[data-value]').val(value); 521 } 522 } 523 524 function increase() { 525 var value = $(this).parent().find('[data-value]').val(); 526 if (value < 100) { 527 value++; 528 $(this).parent().find('[data-value]').val(value); 529 } 530 } 531 532 function valueChange() { 533 var value = $(this).val(); 534 if (value == undefined || isNaN(value) == true || value <= 0) { 535 $(this).val(1); 536 } else if (value >= 101) { 537 $(this).val(100); 538 } 539 } 540 // ========================== Increment & Decrement Js End ===================== 541 542 // ========================== Cart Item Delete Js Start ===================== 543 $('.delete-btn').on('click', function() { 544 $(this).closest('tr').addClass('d-none') 545 }); 546 // ========================== Cart Item Delete Js End ===================== 547 548 // ========================== Password Show Hide Js Start ===================== 549 $(".toggle-password").on('click', function() { 550 var input = $($(this).attr("id")); 551 552 if (input.attr("type") == "password") { 553 input.attr("type", "text"); 554 } else { 555 input.attr("type", "password"); 556 } 557 }); 558 559 $(".toggle-password-two").on('click', function() { 560 $(this).toggleClass(" la-eye-slash"); 561 var input = $($(this).attr("id")); 562 563 if (input.attr("type") == "password") { 564 input.attr("type", "text"); 565 } else { 566 input.attr("type", "password"); 567 } 568 }); 569 // ========================== Password Show Hide Js End ===================== 570 571 // ========================== Dashboard Sidebar Js Start ===================== 572 $('.bar-icon, .arrow-icon').on('click', function() { 573 $('.dashboard').toggleClass('active'); 574 }); 575 576 $('.bar-icon').on('click', function() { 577 $('.dashboard-sidebar').toggleClass('active'); 578 $('.side-overlay').toggleClass('show'); 579 $('body').toggleClass('scroll-hide-sm'); 580 }); 581 582 $('.side-overlay, .dashboard-sidebar__close').on('click', function() { 583 $('.dashboard-sidebar').removeClass('active'); 584 $('.side-overlay').removeClass('show'); 585 $('body').removeClass('scroll-hide-sm'); 586 }); 587 // ========================== Dashboard Sidebar Js End ===================== 588 589 // ==================== Dashboard User Profile Dropdown Start ================== 590 $('.user-profile__button').on('click', function(event) { 591 event.stopPropagation(); 592 $('.user-profile-dropdown').toggleClass('show'); 593 }); 594 595 $('.user-profile-dropdown').on('click', function(event) { 596 event.stopPropagation(); 597 $('.user-profile-dropdown').addClass('show') 598 }); 599 600 $('body').on('click', function() { 601 $('.user-profile-dropdown').removeClass('show'); 602 }) 603 // ==================== Dashboard User Profile Dropdown End ================== 604 605 // ========================== Image Upload Js Start ===================== 606 function readURL(input, previewId) { 607 if (input.files && input.files[0]) { 608 var reader = new FileReader(); 609 reader.onload = function(e) { 610 $(previewId).css('background-image', 'url(' + e.target.result + ')'); 611 $(previewId).hide(); 612 $(previewId).fadeIn(650); 613 }
614 reader.readAsDataURL(input.files[0]); 615 } 616 } 617 618 $("#imageUpload").on('change', function() { 619 readURL(this, '#imagePreview'); 620 }); 621 622 $("#imageUploadTwo").on('change', function() { 623 readURL(this, '#imagePreviewTwo'); 624 }); 625 // ========================== Image Upload Js End ===================== 626 627 // ========================== Magnific Popup Js Start ===================== 628 $('.screenshot-btn').on('click', function() { 629 var images = JSON.parse($(this).attr('data-images')); 630 var items = []; 631 632 for (var i = 0; i < images.length; i++) { 633 items.push({ 634 src: images[i], 635 type: 'image' 636 }); 637 } 638 639 $.magnificPopup.open({ 640 items: items, 641 gallery: { 642 enabled: true 643 }, 644 type: 'image' 645 }); 646 }); 647 // ========================== Magnific Popup Js End ===================== 648 649 // ========================== Footer Has Class section bg Js Start ===================== 650 if ($('.footer').hasClass('section-bg')) { 651 $('.brand').addClass('active'); 652 $('.footer.section-bg').addClass('active'); 653 } 654 // ========================== Footer Has Class section bg Js End ===================== 655 656 // ========================== Apex Chart Js Start ===================== 657 var chartElement = document.querySelector("#chart"); 658 if (chartElement) { 659 // Chart options 660 var options = { 661 series: [{ 662 name: 'Earning: $200', 663 data: [31, 40, 28, 51, 42, 109, 100] 664 }, { 665 name: 'Downloads: 52', 666 data: [11, 32, 45, 32, 34, 52, 41] 667 }], 668 chart: { 669 height: 486, 670 type: 'area', 671 }, 672 673 dataLabels: { 674 enabled: false 675 }, 676 stroke: { 677 curve: 'smooth', 678 }, 679 xaxis: { 680 type: 'datetime', 681 categories: ["2018-09-19T00:00:00.000Z", "2018-09-19T01:30:00.000Z", "2018-09-19T02:30:00.000Z", "2018-09-19T03:30:00.000Z", "2018-09-19T04:30:00.000Z", "2018-09-19T05:30:00.000Z", "2018-09-19T06:30:00.000Z"] 682 }, 683 tooltip: { 684 x: { 685 format: 'dd/MM/yy HH:mm' 686 }, 687 }, 688 }; 689 690 // Create the chart 691 var chart = new ApexCharts(chartElement, options); 692 chart.render(); 693 } 694 // ========================== Apex Chart Js End ===================== 695 696 let lineChart = document.querySelector("#earningChart"); 697 if (lineChart) { 698 var options = { 699 series: [{ 700 name: 'series1', 701 data: [31, 40, 28, 51, 42, 109, 100] 702 }], 703 chart: { 704 height: 350, 705 type: 'line' 706 }, 707 dataLabels: { 708 enabled: false 709 }, 710 stroke: { 711 curve: 'smooth' 712 }, 713 xaxis: { 714 type: 'datetime', 715 categories: ["2018-09-19T00:00:00.000Z", "2018-09-19T01:30:00.000Z", "2018-09-19T02:30:00.000Z", "2018-09-19T03:30:00.000Z", "2018-09-19T04:30:00.000Z", "2018-09-19T05:30:00.000Z", "2018-09-19T06:30:00.000Z"] 716 }, 717 tooltip: { 718 x: { 719 format: 'dd/MM/yy HH:mm' 720 }, 721 }, 722 }; 723 724 var earingChart = new ApexCharts(lineChart, options); 725 earingChart.render(); 726 } 727 728 });
729 // ========================================== 730 // End Document Ready function 731 // ========================================== 732 733 // ========================= Preloader Js Start ===================== 734 $(window).on("load", function() { 735 $('.loader-mask').fadeOut(); 736 }) 737 // ========================= Preloader Js End===================== 738 739 // ========================= Header Sticky Js Start ============== 740 $(window).on('scroll', function() { 741 if ($(window).scrollTop() >= 260) { 742 $('.header').addClass('fixed-header'); 743 } else { 744 $('.header').removeClass('fixed-header'); 745 } 746 }); 747 // ========================= Header Sticky Js End=================== 748 749})(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.