Smooth anchor scrolling Javascript
http://www.issuetrackerproduct.com/About/17th of February 2006
Thanks to Seb Bacon's suggestion I've today looked at enabling smooth scrolling in Javascript for when you click on anchor links. See the result here if you're impatient
That page has a TOC at the top and several "top" links further down. If everything works as expected you'll see that the page scrolls very smoothly when you click on one of the anchor links. I think this is a lovely use of Javascript since it's 100% unobtrusive. If Javascript isn't enabled there's no harm done but if it works you get a much better experience. The smooth scrolling gives you a much better idea of where you are in the page when moving from one anchor to another.
I got the script from Soxiam Wiki but had to modify it to also scroll to div tags with id's that match.
The only disadvantage with this is the additional download of the script on 5Kb but I can optimize that down to 2.2Kb with slimmer
Tweet