1// Ðлок кода Ð´Ð»Ñ FOOTER 2(function () { 3 "use strict"; 4 // ÑобÑÑÐ¸Ñ Ð¿Ð¾Ð¸Ñкового инпÑÑа 5 const searchInput = document.querySelector('.js-search-input'); 6 if (searchInput) { 7 searchInput.addEventListener('focus', function () { 8 this.placeholder === this.value ? this.value = '' : null; 9 console.log(this.value) 10 }); 11 searchInput.addEventListener('blur', function () { 12 !this.value ? this.value = this.placeholder : null; 13 }); 14 } 15 16 // ÐккоÑдион в ÑÑÑоÑе 17 const accardions = document.querySelectorAll('.js-accardion'); 18 if (accardions.length) { 19 accardions.forEach(accardion => { 20 const accardionItems = accardion.querySelectorAll('.js-accardion-item'); 21 const accardionWraps = accardion.querySelectorAll('.js-accardion-wrap'); 22 const accardionContents = accardion.querySelectorAll('.js-accardion-content'); 23 24 if (accardionItems.length) { 25 accardionItems.forEach((item, itemIndex, list) => { 26 const accardionBtn = item.querySelector('.js-accardion-btn'); 27 28 if (accardionBtn) { 29 accardionBtn.addEventListener('click', () => { 30 let isOpen = item.classList.contains('middle-footer__nav-section--opened'); 31 let wrapHeight = accardionContents[itemIndex].offsetHeight + 'px'; 32 33 list.forEach((el, index) => { 34 el.classList.remove('middle-footer__nav-section--opened'); 35 accardionWraps[index].style.height = '0'; 36 }); 37 38 item.classList.toggle('middle-footer__nav-section--opened', !isOpen); 39 accardionWraps[itemIndex].style.height = isOpen ? 0 : wrapHeight; 40 }) 41 } 42 }) 43 } 44 }) 45 } 46}());
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.