Having some trouble getting Spyscroll to work. Can anyone help me identify the issue? I've been at it all day...
I've attempted both the javascript and html+css setups, but neither seem to be functioning correctly. Manually adding the "active" class to the link works for styling, but the navigation is not highlighting as I scroll.
Here's the HTML snippet:
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<nav class="navbar navbar-default navbar-fixed-top">
<ul class="nav">
<li><a href="#1">ABOUT</a></li>
<li><a href="#2">PROCESS</a></li>
<li><a href="#3">SERVICES</a></li>
<li><a href="#4">TEAM</a></li>
</ul>
</nav>
<section class="page" id="1">
</section>
<section style="background-color:red" class="page" id="2">
</section>
<section class="page" id="3">
</section>
<section style="background-color:red" class="page" id="4">
</section>
</body>
And here's the CSS snippet:
.nav {
margin: 0 auto;
list-style: none;
text-align: center;
}
.nav li {
display: inline-block;
margin: 0 10px;
}
.nav li a {
color: #000;
text-decoration: none;
font-weight: bold;
transition: all 0.2s ease;
}
.nav li a:hover {
color: #00dcbe;
}
.nav li a.active {color:blue;}
.page {height:600px;border:1px solid #000}