I used this tutorial to create the "scroll easing" effect on my single page website: http://designshack.net/articles/html/how-to-link-to-specific-points-in-a-page-and-animate-the-scroll/
So I basically just used jQuery scrollTo.js and localScroll and executed it on the page with:
$(document).ready(function() {
$('.fixed_nav').localScroll({duration:700});
});
However, now I want to take it a bit further and make it display the current position on my nav bar with a highlight.
Is there a way to accomplish this with the current tutorial I am using or do I need to try something else?
This is my current HTML and CSS for the navigation:
HTML:
<div class="fixed_nav_wrapper">
<nav class="fixed_nav">
<ul>
<li><a title="go home" href="#home_link">home</a></li>
<li><a title="about me" href="#profile_link">me</a></li>
<li><a title="services" href="#services_link">services</a></li>
<li><a title="samples" href="#samples_link">work</a></li>
<li><a title="contact me" href="#contact_link">contact</a></li>
</ul>
</nav>
</div>
CSS:
.fixed_nav_wrapper {
width:710px;
margin:0 auto;
}
.fixed_nav {
width:100%;
height:50px;
margin: -5px auto 0 auto;
background-color:transparent;
z-index:1000;
}
.fixed_nav ul {
display:block;
margin:0 auto;
padding:15px 5px 5px 5px;
list-style:none;
}
.fixed_nav ul li {
display:inline;
margin:0 auto;
padding:0;
}
.fixed_nav ul li a {
display:block;
float:left;
margin:0 25px;
padding:0 5px 0 4px;
font-size: 2rem;
color:rgba(235,235,235,1);
font-family: Inversionz, sans-serif;
letter-spacing:-0.25rem;
text-decoration:none;
}
.fixed_nav ul li a:hover {
color:rgba(255,255,255,1) !important;
-webkit-box-shadow: 0px 0px 13px 0px rgba(255, 255, 255, 1), 0px 0px 13px 0px rgba(255, 255, 255, 1);
-moz-box-shadow: 0px 0px 13px 0px rgba(255, 255, 255, 1), 0px 0px 13px 0px rgba(255, 255, 255, 1);
box-shadow: 0px 0px 13px 0px rgba(255, 255, 255, 1), 0px 0px 13px 0px rgba(255, 255, 255, 1);
}
There is actually more since I have a "sticky" nav effect when the user scrolls down to a certain point, but this is the basics.