Welcome to mirror list, hosted at ThFree Co, Russian Federation.

application.js « js « static - github.com/d-kusk/minimage.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3305fbc7702caace71fc636a7fd239c9091075c3 (plain)
1
2
!function(){"use strict";function e(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}var n=function(){function n(){var e=this;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),this.opener=document.querySelectorAll(".c-menu"),this.closer=document.querySelectorAll(".c-global-nav__closer"),this.overlay=document.querySelectorAll(".c-overlay"),this.isOpen=!1,Array.from(this.opener,(function(n){n.addEventListener("click",e.overlaySwitcher.bind(e),!1)})),Array.from(this.closer,(function(n){n.addEventListener("click",e.overlaySwitcher.bind(e),!1)}))}var r,t;return r=n,(t=[{key:"overlaySwitcher",value:function(){var e=this;this.isOpen?this.overlay.forEach((function(n){e.isOpen=!1,n.classList.remove("isShow")})):this.overlay.forEach((function(n){e.isOpen=!0,n.classList.add("isShow")}))}}])&&e(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),n}();window.onload=function(){new n}}();
//# sourceMappingURL=application.js.map