mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Override SB Admin2 sidebarToggle function
This commit is contained in:
parent
e25a67b325
commit
ac29197364
@ -266,15 +266,23 @@ $("#sidebarToggleTopbar").on('click', function(e) {
|
|||||||
$(".sidebar").toggleClass("d-none");
|
$(".sidebar").toggleClass("d-none");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Overrides SB Admin 2
|
||||||
|
$("#sidebarToggle, #sidebarToggleTop").on('click', function(e) {
|
||||||
|
var toggled = $(".sidebar").hasClass("toggled");
|
||||||
|
// Persist state in cookie
|
||||||
|
setCookie('sidebar',toggled, 90);
|
||||||
|
});
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
if ($(window).width() < 768) {
|
if ($(window).width() < 768) {
|
||||||
$('.sidebar').addClass('toggled');
|
$('.sidebar').addClass('toggled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).on("load resize",function(e) {
|
||||||
if ($(window).width() > 768) {
|
if ($(window).width() > 768) {
|
||||||
$('.sidebar').removeClass('d-none');
|
$('.sidebar').removeClass('d-none');
|
||||||
|
$('.sidebar').removeClass('d-md-block');
|
||||||
$('.sidebar').removeClass('toggled');
|
$('.sidebar').removeClass('toggled');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user