Merge pull request #262 from sbagdaulet/patch-1

Hide navigation menu in mobile
This commit is contained in:
David Miller
2020-01-14 18:15:51 -05:00
committed by GitHub

View File

@@ -15,6 +15,13 @@
if ($(window).width() < 768) { if ($(window).width() < 768) {
$('.sidebar .collapse').collapse('hide'); $('.sidebar .collapse').collapse('hide');
}; };
// Toggle the side navigation when window is resized below 480px
if ($(window).width() < 480 && !$(".sidebar").hasClass("toggled")) {
$("body").addClass("sidebar-toggled");
$(".sidebar").addClass("toggled");
$('.sidebar .collapse').collapse('hide');
};
}); });
// Prevent the content wrapper from scrolling when the fixed side navigation hovered over // Prevent the content wrapper from scrolling when the fixed side navigation hovered over