Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple navbars collapse #120

Open
osc2nuke opened this issue Aug 30, 2018 · 5 comments
Open

Multiple navbars collapse #120

osc2nuke opened this issue Aug 30, 2018 · 5 comments

Comments

@osc2nuke
Copy link

osc2nuke commented Aug 30, 2018

When require 2 navbars the data-target is not respected for the collapse
navbar 1 uses default:
data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown"
with the collapse element:
<div class="collapse navbar-collapse" id="navbarNavDropdown"></div>
navbar 2 uses default:
data-target="#menuDropdown" aria-controls="menuDropdown"
with the collapse element:
<div class="collapse navbar-collapse" id="menuDropdown"></div>

The same "problematic" behavior can be seen on the demo pages when view the page in tablet/mobile viewport.

Even that the demo navigation bars have their own id's.
Always the First navbar will be toggled, this is really really bad for me.
https://demos.creative-tim.com/material-kit-pro/docs/2.0/components/navbar.html#color-schemes

@osc2nuke
Copy link
Author

More research, it is not the toggling/collapse functionality. That works fine.
But it load the content for the menu always from the first navbar.

@osc2nuke
Copy link
Author

osc2nuke commented Sep 11, 2018

But it load the content for the menu always from the first navbar.

That's not a thumbs-up!
It is broken!
Al the ID's are in place, yet it ALWAYS load the content of the FIRST.
So what is the meaning of specify id, to the collapsible elements, if it is ignored?

Keep in mind , no blaming here, it is only a report. what you made together is real cool.
Why else i would have bought it.......... ( i felt in love with the card headers lol ).
But it is a real bug.

@groovemen
Copy link
Contributor

Hello @osc2nuke,

I tried to fix this bug but there are many things to change for having two or more navbars on the same page and open separately. We will prepare and fix this issue for the next bug; I just sent you an email with the details.

ezgif com-video-to-gif 1

All the best,
Stefan

@anthologyweb
Copy link

Has this issue been resolved? I am still experiencing the problem with expand/collapse behavior of multiple navbar instances on the same page as described by @osc2nuke.

@groovemen
Copy link
Contributor

groovemen commented Feb 3, 2020

Hello @anthologyweb,

Thank you for your interest in working with our products, if you want to have multiple navbars on the same page, you have to change our navbar behavior so you got to make some changes. So, follow the next steps:

• replace the material-kit.js file with this one:
material-kit.js.zip

• replace the assets/scss/material-kit/_responsive.scss file with this one:
_responsive.scss.zip

• for the main navbar, you have to set this class: .main-nav and for the navbar-toggler button you have to set this ID: id="main-nav" like this:

<nav class="navbar navbar-color-on-scroll navbar-transparent main-nav fixed-top  navbar-expand-lg " color-on-scroll="100" id="sectionsNav">
  <div class="container">
    <div class="navbar-translate">
      <a class="navbar-brand"></a>
      <button class="navbar-toggler" id="main-nav" type="button" data-toggle="collapse" aria-expanded="false" aria-label="Toggle navigation">
        <span class="sr-only">Toggle navigation</span>
        <span class="navbar-toggler-icon"></span>
        <span class="navbar-toggler-icon"></span>
        <span class="navbar-toggler-icon"></span>
      </button>
    </div>
    <div class="collapse navbar-collapse">
      <ul class="navbar-nav ml-auto">
        <li class="dropdown nav-item">...</li>
        <li class="dropdown nav-item">...</li>
        <li class="dropdown nav-item">...</li>
      </ul>
    </div>
  </div>
</nav>

**don't forget to recompile the scss after these changes!
Hope that information helps you. Please let us know if we can help you with anything else.

All the best,
Stefan

@groovemen groovemen reopened this Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants