hi please help me,
i have code with following condition
if the user login sidebar collapses, if the user has logged in the sidebar expands, what is the correct logic for the statement below?
if (statement) {
$('[data-widget="pushmenu"]').PushMenu('expand');
}else{
$('[data-widget="pushmenu"]').PushMenu('collapse');
}
Your code is not related to v2024 or not.Note that you use screen.width which is the width of your monitor screen, if you have a monitor wider than 1024px, your code will always expand the push menu.If you want to detect the window width, you may use Window: innerWidth property or the Window: matchMedia() method.You can also change AdminLTE’s Push Menu Plugin option autoCollapseSize. AdminLTE’s default is 992.
How do you do it if the user is logged in and the sidebar expands automatically without having to set the screen width?
Please, the solution is to use the autoCollapseSize option?