Comments (5)
In the file sb-admin2.js, change:
var url = window.location;
var element = $('ul.nav a').filter(function() {
return this.href == url || url.href.indexOf(this.href) == 0;
}).addClass('active').parent().parent().addClass('in').parent();
if (element.is('li')) {
element.addClass('active');
}
to
var url = window.location;
var element = $('ul.nav a').filter(function() {
return this.href == url || url.href.indexOf(this.href) == 0;
}).addClass('active');//.parent().parent().addClass('in').parent();
$(element.parents()).each(function() {
if(this.className.indexOf('collapse') != -1) {
$(this).addClass('in');
}
});
element = element.parent().parent().parent();
if (element.is('li')) {
element.addClass('active');
}
from startbootstrap-sb-admin-2.
Hi,
Maybe I will say a mistake but I am not sure it exists a fourth level (I can't test at the moment).
When I see the "live preview" (http://ironsummitmedia.github.io/startbootstrap-sb-admin-2/pages/index.html), I only see three levels. The same when I look at sb-admin-2.css, I only see nav-second-level and nav-third-level.
How does it work when you only have three levels?
from startbootstrap-sb-admin-2.
Hi swjawa,
Yes but I created fourth level and its working fine. Now selected menu is working also on four levels. I manipulated script as below:
$(function() {
var url = window.location;
var element = $('ul.nav a').filter(function() {
return this.href == url || url.href.indexOf(this.href) == 0;
})
.addClass('active').parent().parent()
.addClass('in').parent()
.addClass('active').parent()
.addClass('in').parent()
.addClass('active').parent()
.addClass('in').parent()
.addClass('active').parent()
});
from startbootstrap-sb-admin-2.
Thanks @lucasssousa10 for the help with this one.
from startbootstrap-sb-admin-2.
The next build isn't going to use metisMenu, but I'm going to try to build the next menu with three tiers as requested in this issue!
from startbootstrap-sb-admin-2.
Related Issues (20)
- Cross site scripting in datatables.net
- Modal close button didn't work
- any django template?
- Menu scroll on Android not working HOT 1
- dropdown-toggle nav-link not responsive HOT 1
- Headache with styles used the template and the documentation
- The support for SB 2 is hopeless HOT 10
- Bootstrap dashboard HOT 1
- Angular Template with layoutSidenav working?
- changing of colors
- Problem with S font in tables
- Font-awesome pseudo elements usage is causing massive slowdowns
- Bootstrap version issue HOT 6
- .
- Bootstrap HOT 1
- Need to update the datatables version
- "sidebarToggle" is not clickable
- Error: UNABLE_TO_GET_ISSUER_CERT_LOCALLY
- Change the url HOT 1
- Cannot run the code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from startbootstrap-sb-admin-2.