I have just started using Bootstrap Studio. I am creating a website based on the Clean Sky prototype, and have added a drop-down item ("Documentation") to the navbar.
When I am on the Home page, the "Home" nav-item is marked as "active" (as expected), but the "Documentation" nav-item is also marked as active. When I am on one of the other pages, only that page's nav-item is marked as "active" (not the "Documentation" nav-item).
Here is the relevant portion of the html:
Does this look like a bug in Smart Active State, or am I doing something wrong?
Before you go editing all the scripts or using others, you may want to do a search on the forums here as it's been covered a few times and there's a specific way it needs to be activated in order for it to work correctly. I don't know what that is as I use 3rd party navigations, but I don't recall it being all too difficult to set up.
I have read through all forum posts concerning Smart Active State, and none of them seem to apply to my case (where the nav-item has no href because it is a dropdown-toggle).
The problem addressed in the other forum posts seems to have to do with nav-items that had been manually marked "active" before turning on Smart Active State. That does not apply in my case.
Twinstream, thanks for the working example. I've been looking at it using Chrome's developer tools. I can't find where you added your javascript. I don't see a reference to a new js file, and I don't see your code in the one js file in "assets".
(I have a lot of experience with desktop and mobile development, but not with responsive web development, sorry.)
I removed everything except the navbar and the js script (which was at the very end in the js file that was minified with the rest of all the other custom js before).
I re-added the "+1", and changed it to add the class "active" to the link element.
When I was using Smart Active State, it was marking just the link element as "active". Your code was marking the link element as "navlink-active" and the list element as "navitem-active", but it wasn't causing the item to appear in bold text. By changing it to mark the link element as "active", it how bolds the text.
I don't understand the nuances here, but at least it is working now.
Thanks again for your help, I really appreciate it!