AdminLTE3 - how to fix active sidebar
See original GitHub issueEnvironment:
- AdminLTE Version: version 3 alpha 2
- Operating System: All.
- Browser (Version): All.
In the previous version of AdminLTE which is the Bootstrap 3 there is a fix to make the sidebar dynamically active when selected.
Here’s the code used
$(function(){
/** add active class and stay opened when selected */
var url = window.location;
// for sidebar menu entirely but not cover treeview
$('ul.sidebar-menu a').filter(function() {
return this.href == url;
}).parent().addClass('active');
// for treeview
$('ul.treeview-menu a').filter(function() {
return this.href == url;
}).parentsUntil(".sidebar-menu > .treeview-menu").addClass('active');
});
but now in AdminLTE 3 this code is not working. Is anyone already tried this? and produced a resolution?
Thanks in advance
Issue Analytics
- State:
- Created 5 years ago
- Comments:15
Top Results From Across the Web
AdminLTE Sidebar Active menu doesn't change dynamically
I try to change the active nav-link when another item is clicked and add "active" to the class. But it just doesn't fire...
Read more >Main Sidebar Component | AdminLTE 3 Documentation
Main Sidebar Component. The sidebar used in this page to the left provides an example of what your sidebar would look like. Construction...
Read more >Showing active in parent and child menu on a drop down side ...
I want to highlight the active page on the side bar menu. I am using Bootstrap (AdminLTE 3) with laravel and vuejs.Kindly anyone...
Read more >active menu adminlte 3 using jquery - Code Grepper
AdminLTe 3.0.x /** add active class and stay opened when selected */ var url = window.location; // for sidebar menu entirely but not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @jvbalcita
Can you test this, please:
放到基础模板或者每个页面的</body>前面。
你这典型的中式英语,茫茫多的英语中一眼就能看出来是国人!