I'm correcting the page of the company where I work and has some problems, I put a side menu as requested by the boss but I have the problem that when you go to another section and click on the menu you go back home
This is my menu button code:
<a id="menu-toggle" href="#" class="glyphicon btn-menu toggle">
<i class="fa fa-bars fa-2x"></i>
</a>
and here what goes on the side part
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<nav id="spy">
<ul class="sidebar-nav nav">
<li class="sidebar-brand">
<a href="index.php" style="color:#de3053; font-size: 20px;">
<strong>
BOOSTERWISE
</strong>
</a>
</li>
</ul>
</nav>
</div>
<div id="page-content-wrapper">
contenido de página
</div>
</div>
here the Script
<script type="text/javascript">
/*Menu-toggle*/
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("active");
});
/*Scroll Spy*/
$('body').scrollspy({ target: '#spy', offset:80});
/*Smooth link animation*/
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
</script>
I just need you not to go home ...