SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast rideforever's Avatar
    Join Date
    Feb 2006
    Location
    Currently: Kashgar, NW China
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Facebook Screen scrolling script

    Hi all,

    Does anyone have any idea how to achieve the vertical scrolling effect that Facebook's profile uses. For example, if you were to click on "Education" the screen would scroll down to the relevant Education section that is then highlighted.

    I would simply like a script that can add this effect to a simple FAQ page with linked hyperlinked questions at the top and answers listed below. Now I have seen one around before but can't find it now.

    I'm not sufficient to program it myself but any open scripts that anyone knows of off hand would be appreciated.

    Best Regards,
    Stephen

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have logged into Facebook but I cannot find what you mention above. I assume you want an animated version of the anchor (<a name="test" /> <a href="#test">Goto test</a>). If so, there are javascript frameworks that have this built in.

    Have a look at: http://techfoolery.com/examples/scroller/


  3. #3
    SitePoint Enthusiast rideforever's Avatar
    Join Date
    Feb 2006
    Location
    Currently: Kashgar, NW China
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Yeah, that hits the mark

    Hi thanks gRoberts that hits the mark and more importantly gave me the keywords I needed to google a bit more. The script you highlighted doesn't like to scroll up only down. But then I found a demo linked from sitepoint which hits the mark.

    Sitepoint page
    http://www.sitepoint.com/article/scr...hly-javascript

    Demo Page
    http://www.kryogenix.org/code/browser/smoothscroll/#p29

    What I would like to do now is add to that script by highlighting the destination of the scroll with a background function. It isn't super important but it would be nice. If a user clicks on an internal link at the top of the page, the following action would be for the page to scroll down and then the final action would be for the bottom anchored text to highlight green, red or some such colour. Perhaps this can be added to smoothscroll.js?

    Thanks for the help
    Stephen


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •