Sean Magyar
Sean Magyar

Reputation: 2380

bootstrap dropdown only on click

I have a dropdown menu implemented with bootstrap3 where I wanna make the dropdown visible only on click instead of hover. My code at the moment:

<li class="dropdown">
  <a href="#" class="dropdown-toggle disabled" id="without-avatar" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
    <i class="fa fa-lg fa-bars"></i>
  </a>
  <ul class = "dropdown-menu">
    <li>......</li>
    ......
  </ul>
</li>

I found some answers where it was said if I use disabled on the a class then the dropdown menu will be available only on click instead of hover. Unfortunately the code is not working. I guess the answer was outdated.

As of 2016 what is the preferred way to solve this problem?

Upvotes: 0

Views: 2126

Answers (1)

Tony Hinkle
Tony Hinkle

Reputation: 4742

The Bootstrap dropdown does not drop down on hover. Please check the code on the enclosing elements to find where the problematic hover event is defined.

Upvotes: 2

Related Questions