I have one .navbar-toggler that I wish to target multiple toggleable navbars with.
I found this questions that is exactly the same but for Bootstrap 3. The solution there was simply to use the data-target attribute of the toggler with a class, and giving that class to all the navbar to be toggled.
This solution does not work for me. Even after putting a class selector as data-target, only the first found element is affected.
Is this a change from v3 to v4? Or is there something I'm not doing right?
This is my button:
<button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" data-target=".exCollapsingNavbar" aria-controls="exCollapsingNavbar" aria-expanded="false" aria-label="Toggle navigation">☰</button>
And both menus have the exact same classes, namely:
'collapse navbar-toggleable-md exCollapsingNavbar'