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:
2
dist/assets/js/scripts.js
vendored
2
dist/assets/js/scripts.js
vendored
@@ -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");
|
||||||
|
Reference in New Issue
Block a user