From 9029e47ce9e41a220710d117868e14d8cd1c719a Mon Sep 17 00:00:00 2001 From: Eden Halperin Date: Thu, 7 Nov 2013 10:46:55 -0500 Subject: [PATCH] Minimize intro sidebar on mobile --- app/assets/javascripts/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index cc4fc72f5..7ed89681e 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -303,4 +303,16 @@ $(document).ready(function () { map.getCenter().lng.toFixed(precision))); }); + function removeSidebar() { + if ($(window).width() < 721) { + $('#sidebar').addClass("minimized"); + } + } + + $(window).resize(function() { + removeSidebar(); + }); + + removeSidebar(); + }); -- 2.39.5