Answer the question
In order to leave comments, you need to log in
How to properly connect bootstrap 5?
I installed Bootstap 5 via npm and connected css and js (/node_modules/bootstrap/dist/js/bootstrap.bundle.js) too, everything works including dropdown, but the modal window does not work, after I already connected css via CDN , js like according to the Bootstrap documentation , the modal window worked, but the dropdown stopped working (codepen - line 11 and 27) ))
HTML markup in codepen
With the help of crutches, I made everything work, but I had to connect js bootstrap.bundle.js (npm) and on top of it put a CDN link (so that the modal window works).
What kind of nonsense, most likely I don’t understand something, tell me what I’m doing wrong?
Answer the question
In order to leave comments, you need to log in
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDarkDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question