Following updates were made after reviewing your comment:
I have analyzed your code to identify any potential issues or improvements.
- It is recommended to have only LI as direct children of UL, instead of having a div directly under UL.
For example, consider this structure:
<ul class="nav sidebar-inner" id="sidebar-menu">
<li class="has-sub">
</li>
<li class="has-sub">
</li>
<li class="has-sub">
</li>
<li class="has-sub">
</li>
<li class="has-sub">
</li>
<li class="has-sub desktop">
</li>
<li class="has-sub mobile">
</li>
<li class="has-sub">
</li>
</ul>
The LI with class "desktop" should be displayed on desktop only, while LI with class "mobile" should be visible on mobile devices.
To achieve this, you can write CSS accordingly. For example, hide mobile by default and show it on mobile only, while hiding desktop on mobile screens:
.mobile {display: none;}
@media(max-width:767px){
.mobile {
display: block;
}
.desktop {
display: none;
}
}
NOTE: The media point of 767px used in the example can be adjusted based on your requirements. Ensure to align your CSS with the correct HTML structure for desired functionality.