luci-theme-rosy: Correcting Writing Errors and Style Errors
[oweals/luci.git] / themes / luci-theme-rosy / htdocs / luci-static / rosy / js / script.js
index e8424411db506cd5d645826fe16b96a1d8059ad5..73557adc0e5d2c4dee19669c4af7789f07627825 100755 (executable)
      * Sidebar expand
      */
     var showSide = false;
-    if ($(win).height() == 992) {
-        $(".showSide").click(function () {
-            if (showSide) {
-                $(".darkMask").stop(true).fadeOut("fast");
-                $(".main-left").stop(true).fadeOut("fast");
-                $(".main-right").css("overflow-y", "visible");
-                showSide = false;
-            } else {
-                $(".darkMask").stop(true).fadeIn("fast");
-                $(".main-left").stop(true).animate({
-                    width: "100%"
-                }, "fast").fadeIn("fast");
-                $(".main-right").css("overflow-y", "hidden");
-                showSide = true;
-            }
-        });
+    $(".showSide").click(function () {
+        if (showSide) {
+            $(".darkMask").stop(true).fadeOut("fast");
+            $(".main-left").stop(true).fadeOut("fast");
+            $(".main-right").css("overflow-y", "visible");
+            showSide = false;
+        } else {
+            $(".darkMask").stop(true).fadeIn("fast");
+            $(".main-left").stop(true).animate({
+                width: "100%"
+            }, "fast").fadeIn("fast");
+            $(".main-right").css("overflow-y", "hidden");
+            showSide = true;
+        }
+    });
+    if($(win).width() <= 992){
         $(".main-left").click(function(e) {
             e.preventDefault();
             $(".main-left").stop(true).fadeOut("fast");
         }
     });
 
-})(window, jQuery);
\ No newline at end of file
+})(window, jQuery);