navbar dropdown toggling not working


Topic: navbar dropdown toggling not working

pcnet asked 5 years ago

*Expected behavior*When I click the outside of dropdown menu, it should be disappeared.

*Actual behavior*Still show. https://mdbootstrap.com/docs/jquery/navigation/navbar/ the sample link is appearing after outside of menu.

*Resources (screenshots, code snippets etc.)*After I removed the js/mdb.min.js , it is working.


Grzegorz Bujański staff commented 5 years ago

Hi. Create snippet here: https://mdbootstrap.com/snippets with your code. I'll look at this.


pcnet answered 5 years ago

this is my code

Sample Creation

Navbar

<!-- Links -->
<ul class="navbar-nav mr-auto">
  <li class="nav-item active">
    <a class="nav-link" href="#">Home
      <span class="sr-only">(current)</span>
    </a>
  </li>
  <!-- Dropdown -->
  <li class="nav-item dropdown">
    <span class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      Dropdown
    </span>
    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
      <a class="dropdown-item" href="#">Action</a>
      <a class="dropdown-item" href="#">Another action</a>
      <div class="dropdown-divider"></div>
      <a class="dropdown-item" href="#">Something else here</a>
    </div>
  </li>

</ul>
<!-- Links -->


Grzegorz Bujański staff commented 5 years ago

I can't reproduce this error. I create snippet here: https://mdbootstrap.com/snippets/jquery/grzegorz-bujanski/1607246 and it work fine for me.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.10.1
  • Device: PC, Chrome
  • Browser: chrome, opera, firefox, edge
  • OS: windows, android
  • Provided sample code: No
  • Provided link: Yes
Tags