Getting rid of Compass, now styling & compiling is done via Grunt
[ghost-theme-willow.git] / assets / js / script.js
index 95e8c9f2a7e292a5d9e146cfa871d07b15f977b1..c04d29628f1d7ba8a5d7036e9c19e215b37f78b4 100644 (file)
@@ -1,48 +1 @@
-/*
- | -----------------------------------------------------------------------------
- | Functionality for off-canvas menu / sidebar visibility
- | -----------------------------------------------------------------------------
-*/
-
-/*jslint browser:true*/
-
-(function (document) {
-    'use strict';
-
-    document.addEventListener('DOMContentLoaded', function () {
-        var menu = document.getElementById('mobile-menu'),
-            wrapper = document.getElementById('wrapper'),
-            content = document.getElementById('content'),
-            menuVisibilityData = 'data-menu-visible';
-
-        /*
-         | ---------------------------------------------------------------------
-         | Click on content element results in menu getting closed
-         | ---------------------------------------------------------------------
-         */
-        content.addEventListener('click', function (event) {
-            if (wrapper.getAttribute(menuVisibilityData)) {
-                wrapper.removeAttribute(menuVisibilityData);
-
-                event.preventDefault();
-                event.stopPropagation();
-            }
-        });
-
-        /*
-         | ---------------------------------------------------------------------
-         | Click on menu element results in menu getting opened
-         | ---------------------------------------------------------------------
-         */
-        menu.addEventListener('click', function (event) {
-            if (!wrapper.getAttribute(menuVisibilityData)) {
-                wrapper.setAttribute(menuVisibilityData, '1');
-            } else {
-                wrapper.removeAttribute(menuVisibilityData);
-            }
-
-            event.preventDefault();
-            event.stopPropagation();
-        });
-    });
-}(document));
\ No newline at end of file
+!function(a){"use strict";a.addEventListener("DOMContentLoaded",function(){var b=a.getElementById("mobile-menu"),c=a.getElementById("wrapper"),d=a.getElementById("content"),e="data-menu-visible";d.addEventListener("click",function(a){c.getAttribute(e)&&(c.removeAttribute(e),a.preventDefault(),a.stopPropagation())}),b.addEventListener("click",function(a){c.getAttribute(e)?c.removeAttribute(e):c.setAttribute(e,"1"),a.preventDefault(),a.stopPropagation()})})}(document);
\ No newline at end of file