1;(function () { 2 if(document.querySelector('.latest-teach') && window.innerWidth >= 768) { 3 const parentElem = document.querySelector('.teach-items'); 4 const items = parentElem.querySelectorAll('.teach-item'); 5 6 let heightList = 1; 7 Array.prototype.forEach.call(items, (item) => { 8 parentElem.style.marginBottom = item.clientHeight + 20 + 'px'; 9 if (heightList < item.clientHeight) { 10 heightList = item.clientHeight; 11 } 12 let targetElem = item.querySelector('.preview'); 13 targetElem.addEventListener('click', () => { 14 items.forEach((oldItem) => { 15 oldItem.classList.remove('active'); 16 }); 17 parentElem.style.marginBottom = targetElem.clientHeight + 20 + 'px'; 18 item.classList.add('active'); 19 }) 20 }); 21 22 Array.prototype.forEach.call(items, (item) => { 23 let preview = item.querySelector('.preview'); 24 preview.style.height = heightList + 'px'; 25 }); 26 } 27 28 if(document.querySelector('.capabilities')) { 29 const parentElem = document.querySelector('.capabilities-block'); 30 const items = parentElem.querySelectorAll('.dev-description'); 31 32 Array.prototype.forEach.call(items, (item) => { 33 item.addEventListener('click', (e) => { 34 if (/active/.test(item.classList)) { 35 item.classList.remove('active'); 36 } else { 37 item.classList.add('active'); 38 } 39 }) 40 }); 41 } 42})();
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.