'Bootstrap Data-bs-toggle is not working in the currently version?
I notice that bootstrap 5.1.3 data-bs-toggle isn't working anymore. Like in this exemple:
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" datadat-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
If you use the data-bs-toggle="dropdown" it just doens't work. I would like to know if this is happening with you too and why is that? Maybe the version 5.1.3 has some kind of bug? Here is the bootstrap official page for this NavBar component example: https://getbootstrap.com/docs/5.1/components/navbar/
Solution 1:[1]
There is a typo:
Switch "datadat-bs-toggle" to "data-bs-toggle"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jeremy Coathup |
