{"version":3,"file":"hamburger-menu.js","sources":["hamburger-menu.js"],"sourcesContent":["/**\n * @file\n * A JavaScript file for the hamburger menu.\n *\n */\n\n(function ($) {\n\n var event = (navigator.userAgent.match(/iPhone/i)) ? \"touchstart\" : \"click\";\n\n Drupal.behaviors.hamburgerMenu = {\n attach: function (context) {\n\n // Attach click function for hamburger toggle.\n var toggleButton = document.getElementById( 'hamburger' );\n // Clicking the button\n // NOTE: need to update this for touchstart?\n toggleButton.onclick = function() {\n $('#navigation-panel').slideToggle(); // open dropdown\n // $('#search-box-wrapper').removeClass('open'); // close search box if open\n // 1. Toggle class \"is-active\"\n // 2. Set aria-expanded to true or false.\n if ( -1 !== toggleButton.className.indexOf( 'is-active' ) ) {\n toggleButton.className = toggleButton.className.replace( ' is-active', '' );\n toggleButton.setAttribute( 'aria-expanded', 'false' );\n } else {\n toggleButton.className += ' is-active';\n toggleButton.setAttribute( 'aria-expanded', 'true' );\n }\n // close search box if is open\n $('#search-box-wrapper').removeClass('open');\n };\n\n $('#navigation-panel .wrapper__menu--main > ul.menu').prepend('