I’ve been struggling with this issue for days now. I’ve searched everywhere for a solution, but to no avail. That’s why I’m turning to the experts here for help :-)
The problem I’m facing is that my mobile menu won’t open. Nothing happens when I try.
Here is what it looks like:
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" href="/">
<img src="/static/img/logo.svg" alt="logo">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
id="toggleMobileNav" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse navbar-mobile" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link mobile-nav-link"href="/#features">Features</a>
</li>
<li class="nav-item">
<a class="nav-link mobile-nav-link"href="/#download">Download</a>
</li>
<li class="nav-item">
<a class="nav-link mobile-nav-link" href="/about">About us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/faq">FAQ</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/blog">Blog</a>
</li>
</ul>
</div>
</div>
</nav>
In the meantime, I have even tried replacing it with the code provided in Bootstrap 5’s official documentation (https://getbootstrap.com/docs/5.0/components/navbar/)
I’ve watched numerous YouTube videos where they simply paste the code and it works flawlessly. But not even the example from Bootstrap 5’s docs seems to be working for me. Can anyone please point out any errors?
Thank you!