function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n_createClass(function e(){_classCallCheck(this,e),_defineProperty(this,"use strict",void 0),this.openMenuButton=document.querySelector("#clay-menu-toggle"),this.targetMenuID=document.querySelector("#clay-menu-toggle").dataset.target},[{key:"openButtonAction",value:function(){var e=document.getElementById(this.targetMenuID);this.openMenuButton.addEventListener("click",function(){null!=e?(e.classList.toggle("open"),document.body.classList.toggle("nav-open")):console.log("Toggle menu target with the element id: ["+this.targetMenuID+"], does not exist.")})}},{key:"closeButtonAction",value:function(){var e=document.getElementById("main-menu-close"),t=document.getElementById(this.targetMenuID);e.addEventListener("click",function(){t.classList.remove("open"),document.body.classList.remove("nav-open")})}}]))();window.addEventListener("load",function(){var e=new ClayMenuToggle;e.openButtonAction(),e.closeButtonAction()});; (function( $ ) { 'use strict'; /** * All of the code for your public-facing JavaScript source * should reside in this file. * * Note: It has been assumed you will write jQuery code here, so the * $ function reference has been prepared for usage within the scope * of this function. * * This enables you to define handlers, for when the DOM is ready: * * $(function() { * * }); * * When the window is loaded: * * $( window ).load(function() { * * }); * * ...and/or other possibilities. * * Ideally, it is not considered best practise to attach more than a * single DOM-ready or window-load handler for a particular page. * Although scripts in the WordPress core, Plugins and Themes may be * practising this, we should strive to set a better example in our own work. */ })( jQuery ); ;