[Notice] Announcing the End of Demo Server [Read me]
usermenu: Makes the usermenu disappear if the resolution is less than 720 px
@2a482ec6692f49d5c28ed14f88f093b66bc5ed37
--- app/views/index/index.scala.html
+++ app/views/index/index.scala.html
... | ... | @@ -120,15 +120,15 @@ |
120 | 120 |
var requiredLoggedIn = $("#required-logged-in").length === 1; |
121 | 121 |
if(!requiredLoggedIn){ |
122 | 122 |
var viewSize = $(window).width(); |
123 |
- if( viewSize < 720) { |
|
124 |
- $("#mySidenav").width("100vw").css("border", "1px solid #ccc"); |
|
125 |
- } else { |
|
123 |
+ if( viewSize > 720) { |
|
126 | 124 |
$("#mySidenav").width("400px").css("border", "1px solid #ccc"); |
125 |
+ setTimeout(function () { |
|
126 |
+ $("#main").off("click"); |
|
127 |
+ }, 1000); |
|
128 |
+ } else { |
|
129 |
+ $("#mySidenav").width("100vw").css("border", "1px solid #ccc"); |
|
127 | 130 |
} |
128 | 131 |
$(".search-input").focus(); |
129 |
- setTimeout(function () { |
|
130 |
- $("#main").off("click"); |
|
131 |
- }, 1000); |
|
132 | 132 |
} |
133 | 133 |
}); |
134 | 134 |
</script> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?