0

I've got this menu working when I release the mouse button over the "Menu Name" bit:

<button type="button btn btn-secondary" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
        aria-haspopup="true" aria-expanded="false">*Menu Name*<span class="caret"></span>
</button>
<ul class="dropdown-menu">
    <li><a href="#">Do Something</a></li>
    <li><a href="#">Do The Other Thing</a></li>
</ul>

This is a rails 6 app with lots of JS, using bootstrap 3 because that's what I learned from, and if I move to bootstrap 5 I get errors complaining about something called popper (sounds like the dropdown relies on it), and who knows what else will break if I continue -- looks like lots of things changed going from bootstrap 3 to 4, and then to 5.

So is there a straightforward way to do this?

2
  • I also would suggest to move on to Bootstrap 5. You "just" need to include popper as explained here: getbootstrap.com/docs/5.3/getting-started/introduction
    – zaphodbln_
    Commented Nov 8, 2023 at 10:02
  • Thanks. I tried moving to bs5 and ran into one problem after another. This is part of a one-week hack project and I have to trade off just getting things done vs getting them done correctly. So my poor users will have to deal with the old-style dropdown buttons.
    – Eric
    Commented Nov 8, 2023 at 22:28

0