I recently added a navigation bar to my website using the BootStrap documentation. However, when I switch to the mobile version and click on the hamburger menu, nothing happens. Below is the code snippet for reference:
<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #000000;">
<a class="navbar-brand" href="#">Salman's Website</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="nav navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="index.html">Home<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="electric.html">Electric<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="gasoline.html">Gasoline<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="hybrid.html">Hybrid<span class="sr-only">(current)</span></a>
</li>
</ul>
</div>
</nav>
To ensure responsiveness, I have included
<meta name="viewport" content="width=device-width, initial-scale=1.0">
in the head section as well.
Your help would be greatly appreciated.