Home

Animated Anchor Links

I still haven’t found someone dumb enough to not understand (or care) what happens when you follow an anchor within a page, but for all those people riding the short bus, here’s something to make your lives easier :-)

Brand Spanking New: Animated anchor links with unobtrusive javascript

The script parses all of the links to anchors on the page and replaces them with a javascript method that scrolls the page to the anchor instead of jumping to it. Additionally, the script checks whether the target is above or below the link, and adds an arrow to indicate the direction using css & background images. Turning off javascript leaves you with classic anchor links.

Related Posts

Comments are closed.