1'use strict'; 2 3(function iifeMenu(document, window, undefined) { 4 var menuBtn = document.querySelector('.menu__btn'); 5 var menu = document.querySelector('.menu__list'); 6 7 function toggleMenu() { 8 menu.classList.toggle('menu__list--active'); 9 menu.classList.toggle('menu__list--transition'); 10 this.classList.toggle('menu__btn--active'); 11 this.setAttribute( 12 'aria-expanded', 13 this.getAttribute('aria-expanded') === 'true' ? 'false' : 'true' 14 ); 15 } 16 17 function removeMenuTransition() { 18 this.classList.remove('menu__list--transition'); 19 } 20 21 if (menuBtn && menu) { 22 menuBtn.addEventListener('click', toggleMenu, false); 23 menu.addEventListener('transitionend', removeMenuTransition, false); 24 } 25}(document, window));
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.