0
I’m making a website with bootstrap, but the dropdown menu does not work, below a code snippet:
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Cadastros
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">null</a>
<a class="dropdown-item" href="#">null</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">null</a>
</div>
</li>
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Lançamentos
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">null</a>
<a class="dropdown-item" href="#">null</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">null</a>
</div>
</li>
I believe it is because some bootstrap department is missing, but I do not know which one. I have tried several links in my code, but it still doesn’t work.
Note: These "null" within the items was my friend (which obviously does not match the ideas) who put, in his head this must have made sense kk
you linked the bootstrap and jquery in your project?
– Luan Brito
Bootstrap yes, jquery I’m not familiar with, and I don’t know which library is responsible for the dropdown.
– Lucas_Squ4nchy
try to add this and see if it’s right <script src="https://code.jquery.com/jquery-3.4.1.js" Integrity="sha256-Wpoohjoqmqqykl9fccasb9o0kwacqjpftubltyovvvu=" crossorigin="Anonymous"></script>
– Luan Brito