-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmail-two.js
31 lines (31 loc) · 990 Bytes
/
mail-two.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$(function() {
'use strict'
$('.main-sidebar .with-sub').on('click', function(e) {
e.preventDefault();
$(this).parent().toggleClass('show');
$(this).parent().siblings().removeClass('show');
})
$(document).on('click touchstart', function(e) {
e.stopPropagation();
// closing of sidebar menu when clicking outside of it
if (!$(e.target).closest('.main-header-menu-icon').length) {
var sidebarTarg = $(e.target).closest('.main-sidebar').length;
if (!sidebarTarg) {
$('body').removeClass('main-sidebar-show');
}
}
});
$('#mainSidebarToggle').on('click', function(e) {
e.preventDefault();
if (window.matchMedia('(min-width: 992px)').matches) {
$('body').toggleClass('main-sidebar-hide');
} else {
$('body').toggleClass('main-sidebar-show');
}
})
// Toggle Mail Menu
$('#mainMailLeftShow').on('click', function(e) {
e.preventDefault();
$('#mailMenu').toggleClass('d-none');
})
});