1
0
mirror of https://github.com/stisla/stisla.git synced 2025-08-31 11:52:06 +02:00

Close sidebar in mobile if tap outside

This commit is contained in:
David Polynar
2019-02-14 10:24:11 +01:00
committed by GitHub
parent ba2224d90d
commit c1b5fff9c1

View File

@@ -203,7 +203,7 @@ $(function() {
$("body").addClass("sidebar-gone");
$("body").removeClass("layout-2 layout-3 sidebar-mini sidebar-show");
$("body").off('click').on('click', function(e) {
$("body").off('click touchend').on('click touchend', function(e) {
if($(e.target).hasClass('sidebar-show') || $(e.target).hasClass('search-show')) {
$("body").removeClass("sidebar-show");
$("body").addClass("sidebar-gone");