I have some anchors on a site I'm playing with and I'd like them to scroll to anchors instead of doing a sudden jump to the anchor. I've tried several posted solutions here on stack overflow but haven't been able to get them to work. Am I doing something wrong?
I've tried this code and several like it but they don't seam to work:
$('a').click(function(){
$('html, body').animate({
scrollTop: $( $(this).attr('href') ).offset().top
}, 500);
return false;
});
The site can be found here and currently only the 'about us' item is anchored: http://jsfiddle.net/pnKu2/