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

Merge pull request #14 from polynar/patch-1

Close sidebar in mobile if tap outside
This commit is contained in:
Muhamad Nauval Azhar
2019-02-14 16:43:44 +07:00
committed by GitHub

View File

@@ -203,7 +203,7 @@ $(function() {
$("body").addClass("sidebar-gone"); $("body").addClass("sidebar-gone");
$("body").removeClass("layout-2 layout-3 sidebar-mini sidebar-show"); $("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')) { if($(e.target).hasClass('sidebar-show') || $(e.target).hasClass('search-show')) {
$("body").removeClass("sidebar-show"); $("body").removeClass("sidebar-show");
$("body").addClass("sidebar-gone"); $("body").addClass("sidebar-gone");