legende, fleche mon espace
This commit is contained in:
@@ -80,6 +80,23 @@ jQuery(document).ready(function($){
|
||||
////////////// tiroir fichiers ///////
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// Check the initial state for mobile and add class if needed
|
||||
function checkMobileAndApplyClass() {
|
||||
if (window.innerWidth <= 768) { // Adjust the width to match your mobile breakpoint
|
||||
$(".layout-sidebar-second").addClass('display-none');
|
||||
} else {
|
||||
$(".layout-sidebar-second").removeClass('display-none');
|
||||
}
|
||||
}
|
||||
|
||||
// Run the mobile check on page load
|
||||
checkMobileAndApplyClass();
|
||||
|
||||
// Re-check when the window is resized
|
||||
$(window).resize(function() {
|
||||
checkMobileAndApplyClass();
|
||||
});
|
||||
// Vérifier l'état initial depuis sessionStorage
|
||||
if (sessionStorage.getItem('asideOpened') === 'true') {
|
||||
$(".layout-sidebar-second").addClass('close');
|
||||
|
||||
Reference in New Issue
Block a user