Uncaught TypeError: n is not a constructor with Bootstrap 4 dropdown
Asked Answered
S

3

9

I have multiple dropdown menus in my page. Located inside the nav works fine, but the inside of the page does not work

Located inside the nav

enter image description here

inside of the page

enter image description here

enter image description here

what is the problem? Thank you.

Spencerianism answered 11/7, 2020 at 12:49 Comment(0)
C
18

Bootstrap is not yet compatible with Popper.js version 2, see https://github.com/snapappointments/bootstrap-select/issues/2385#issuecomment-579892665.

The bundle works because it bundles the right version of Popper, see https://getbootstrap.com/docs/4.5/getting-started/introduction/.

Conversant answered 23/9, 2020 at 14:4 Comment(0)
S
3

bootstrap.bundle.min.js or bootstrap.bundle.js solves the problem.

Spencerianism answered 12/7, 2020 at 10:46 Comment(0)
W
3

As it answer before... popper js v2 not compatible with boostrap

you need to downgrade the popper.js version

cdn:

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
Whisper answered 29/10, 2020 at 11:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.