I'm using the Anchor menu, and when I click the link it gets to the top of the menu, how do I position it under the menu?
Howtostay:
code:'Script'
<script>varmenu=$('#menu.navli');varsectionPositions=$('section').map(function(){return$(this).position().top;});varsections=$('section');$(document).on('scroll',function(){varscroll=$(document).scrollTop();varcurrentElement;$(sectionPositions).each(function(i){if(scroll>this-50)currentElement=menu[i];});currentElement&&addClass(currentElement);});menu.on('click',function(){addClass(this);});functionaddClass(el){menu.removeClass('active');$(el).addClass('active');};</script>
Section
<sectiondata-slide="4" id="Devices">
<div class="row">
<div class="div2 text-center">
<img class="div2Img" src="~/Content/Images/BackGround/dispositivos.png" />
<p class="div2Texto">Seu Site ou Software funcionando em qualquer dispositivo</p>
</div>
</div>
</section>
Menu
<li><a href="#Devices">Dispositivos</a></li>