2006-08-16

Smooth scrolling anchor link code

E-biznes i projektowanie witryn internetowych.: "
Code / Smooth Scrolling Anchor Links In Javascript
This is a useful javascript code I found at kryogenix that allows smooth scrolling when anchor links (internal links within a web page) are clicked on. Personally I think this goes beyond the simple eye-candy "wow" factor. Often users would lose bearing when clicking on the anchor links, unsure if they're now on a different web page or not. This smooth scrolling effect presents clear(er) idea of what's happened. You can find many more useful javascripts at kryogenix including few you may have already heard about: DOM Image Annotation Sotable Tables Nice Titles Smooth scrolling anchor link code The code parses the document and checks for conditions (such as 1. Does the link contain a hash? 2. Is the link the same as the current location? 3. Is the querystring the same as the current location?) then applies the smooth scrolling effect to the internal links that meet these conditions. More detailed explanation of the code can be found at SitePoint. [@ /* Smooth scrolling Changes links that link to other ...."

1 komentarz:

JMKR pisze...

Czy ktoś zna adresy stron z dobrymi skryptami ?
Does anyone know web addresses with good scripts ?