I have a fixed header bar with basic navigation like so:
<html> <head></head> <body> <ul class="nav navbar-nav"> <li><a id="aboutme" href="#about-me">About</a></li> <li><a id="workme" href="#work-me">Work</a></li> <li><a id="contactme" href="#contact-me">Contact</a></li> </ul> ... .. . <div id="about-me"> </div> </body> </html>
I want these to direct to a section in the same page using the 'linear', 'slow' animation values, but my code isn't working:
$(document).ready(function() {
$('aboutme').click(function() {
$.scrollTo($("#about-me"),{duration: 1});
});
});
Do you know where my syntax has gone wrong? And would I need to use the jQuery animatedScroll on github to achieve this?
Thanks :)