On my website, everything works perfectly with the Nav bar except for when I am on mobile. When I click on any href from my Nav Bar, it directs me to the correct location but does not close the Nav Bar afterward. I need it to function this way: After clicking on a Nav Bar link, it should take me to the location and then automatically close the Nav Bar, so it does not obstruct the content I am trying to access. For reference, you can view this video example: https://youtu.be/BWffD2Lew8w
Can anyone provide guidance on how I can resolve this issue? Below is the code I have used for that section. Thank you!
<nav class="navbar fixed-top navbar-expand-lg navbar-dark d-md-inline d-lg-none" id="navbarFunctions" style="background-color: #0f0f0f;">
<div class="container-fluid">
<a class="navbar-brand" href="#Inicio"><img src="navbar/LogoWhite.svg" width="200" height="50"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarBtn" aria-controls="navbarBtn" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarBtn">
<ul class="navbar-nav" style="font-size: 1.25rem;">
<li class="nav-item mx-2">
<a class="nav-link" href="#Inicio">Inicio</a>
</li>
<li class="nav-item mx-2">
<a class="nav-link" href="#Beneficios">Beneficios</a>
</li>
<li class="nav-item mx-2">
<a class="nav-link" href="#Como_Funciona">¿Cómo funciona?</a>
</li>
<li class="nav-item mx-2">
<a class="nav-link" href="#Carta_Muestra">Carta Muestra</a>
</li>
<li class="nav-item mx-2">
<a class="nav-link" href="#Precios">Precios</a>
</li>
<li class="nav-item mx-2">
<a class="nav-link" href="#Contacto">Contacto</a>
</li>
</ul>
</div>
</div>
</nav>