Topic: dropdown javascript toggle not working

euclidwebteam pro asked 6 years ago


Hi there, I'm trying to toggle dropdowns using the javascript method, but it doesn't work with MDB PRO 4.5.6. However, this code does work when I use MDB FREE 4.5.6. As an example:
<div class="btn-group">
    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Basic dropdown</button>

    <div class="dropdown-menu">
        <a class="dropdown-item" href="#">Action</a>
        <a class="dropdown-item" href="#">Another action</a>
        <a class="dropdown-item" href="#">Something else here</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#">Separated link</a>
     </div>
</div>

<script>
    $('.dropdown-toggle').dropdown('toggle') 
</script>

Bartłomiej Malanowski staff commented 6 years ago

Do you get any console logs?

euclidwebteam pro commented 6 years ago

I don't get any errors in the console.

cbutler90 free commented 5 years ago

having the same issue now


Bartłomiej Malanowski staff commented 5 years ago

how can we reproduce it?



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags