1import CustomAcc from './components/CustomAcc.js'; 2import CustomCount from './components/CustomCount.js?12'; 3import CustomMiniCart from './components/CustomMiniCart.js'; 4import initLazyLoading from './components/CustomLazy.js'; 5 6customElements.define('custom-acc', CustomAcc); 7customElements.define('custom-count', CustomCount); 8customElements.define('custom-cart', CustomMiniCart); 9 10 11 12/* 13ÐапÑÑкаем ленивÑÑ Ð·Ð°Ð³ÑÑÐ·ÐºÑ ------------------------------------------------------------*/ 14initLazyLoading(); 15 16/* 17fancybox init ------------------------------------------------------------*/ 18Fancybox.bind(); 19 20/* 21mask init ----------------------------------------------------------------*/ 22if (document.querySelector('input[type="tel"]')) { 23 let phone = document.querySelectorAll('input[type="tel"]'); 24 [...phone].forEach((phone) => { 25 IMask( 26 phone, 27 { 28 mask: '+{7} (000) 000-00-00' 29 } 30 ) 31 }); 32} 33 34/* 35scroll ------------------------------------------------------------*/ 36 37/*var scrollup = document.querySelector('.scrollup'); 38scrollup.addEventListener('click', function (e) { 39 e.preventDefault(); 40 window.scrollTo({ top: 0, behavior: 'smooth' }); 41}); 42*/ 43 44 45/* 46cookie message ------------------------------------------------------------*/ 47 48 49/* 50mobile menu ------------------------------------------------------------*/ 51 52 53/* 54swiper ------------------------------------------------------------*/ 55/*const swiper = new Swiper('.swiper', { 56 // Optional parameters 57 direction: 'horizontal', 58 loop: true, 59 60 // If we need pagination 61 pagination: { 62 el: '.swiper-pagination', 63 }, 64 65 navigation: { 66 nextEl: '.swiper-button-next', 67 prevEl: '.swiper-button-prev', 68 }, 69});*/ 70 71 72 73/* 74form checker ------------------------------------------------------------*/ 75 76 77/* 78swiper init ------------------------------------------------------------*/ 79function initSwiper(selector) { 80 81 const swipers = document.querySelectorAll(selector); 82 swipers.forEach(swiper => { 83 84 new Swiper(swiper, { 85 slidesPerView: 4, 86 spaceBetween: 50, 87 navigation: { 88 nextEl: swiper.parentElement.querySelector('.swiper-button-next'), 89 prevEl: swiper.parentElement.querySelector('.swiper-button-prev'), 90 }, 91 breakpoints: { 92 93 320: { 94 slidesPerView: 1, 95 spaceBetween: 0 96 }, 97 // when window width is >= 480px 98 767: { 99 slidesPerView: 2, 100 spaceBetween: 30 101 }, 102 // when window width is >= 640px 103 900: { 104 slidesPerView: 3, 105 spaceBetween: 20 106 }, 107 1200: { 108 slidesPerView: 4, 109 spaceBetween: 37 110 } 111 }, 112 }); 113 }); 114} 115 116 117// ÐниÑиализиÑÑем каÑÑÑели пÑоекÑов 118//initSwiper('.mproduct-swiper'); 119 120let chk = document.querySelectorAll('.chk-cnt'); 121[...chk].forEach((chk) => { 122 let inp = chk.querySelector('input'); 123 let but = inp.closest('form').querySelector('.submit-button input'); 124 if (inp.checked === true) { 125 but.removeAttribute('disabled'); 126 } else { 127 but.setAttribute('disabled', 'disabled'); 128 } 129 130 chk.addEventListener('click', function (e) { 131 let but = this.closest('form').querySelector('.submit-button input'); 132 if (e.target.checked === true) { 133 but.removeAttribute('disabled'); 134 } else { 135 but.setAttribute('disabled', 'disabled'); 136 } 137 }); 138});
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.