Hello fellow stackoverflowers!
I am currently making a mobile site with bootstrap 3. The site only has 2 levels of pages...main menu and then certain pages have sub menus.
If I am on a sub-page and I open the menu I would like that parent to be open so that I can see what page I am on with the parent expanded.
In the DOM I can do this very easily by adding the class 'open' to <li class="dropdown">
The problem is that when I tell my cms to work out if this page is a child and then to add that class, it does it fine but bootstrap seems to be automatically removing it? The 'open' class is there when I view source but not when I inspect the element. If I remove the bootstrap js then the class is there when I inspect so it is bootstrap that is removing it.
I have tried manually adding the class with javascript and that doesnt work...I have tried using the $().dropdown('toggle')
from the bootstrap docs but that doesnt work...I even tried finding the element and then trigerring a jquery .click method and that doesnt work either so im a bit stumped...
Cheers
Matt