Smooth Scrolling
Give smooth Scrolling to the anchor tags
Add to your js file, it uses jQuery
It should just work.
$(document).ready(function(){
$(function() {
var topoffset = 90; // the margin that needs to be given on the top
$('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 - topoffset
}, 1000);
return false;
}
}
});
});
});