A while back I posted about automatically scrolling between internal links with some jQuery magic (which in turn was based on a tutorial by Learning jQuery) but one problem with it was that there was no way for the user to link to the anchor.
The problem was that because the function has to
return false in order to keep the browser from jumping straight through to the anchor and skipping the animation. So I added another line to the code, taking after AJAX pseudo-permalinks, that adds the hash link (e.g.
#anchor) back onto the URL in the address bar after a timeout matching the animation.
Here’s the line in question:
Here’s the full code: