]> git.openstreetmap.org Git - rails.git/commitdiff
Minimize intro sidebar on mobile
authorEden Halperin <eden.halperin@gmail.com>
Thu, 7 Nov 2013 15:46:55 +0000 (10:46 -0500)
committerEden Halperin <eden.halperin@gmail.com>
Thu, 7 Nov 2013 15:46:55 +0000 (10:46 -0500)
app/assets/javascripts/index.js

index cc4fc72f51701b9a500fb13e04b66f7a1f2253ee..7ed89681e01749c7483652bba5b1629baa04cf27 100644 (file)
@@ -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();
+
 });