Results 1 to 2 of 2

Thread: Auto Scroll Down on click??

  1. #1
    Join Date
    Mar 2005
    Posts
    110
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Auto Scroll Down on click??

    is there a script that can create the following scenario:

    when a link is clicked, the new page that opens up will scroll automatically to a specified area of the page? for instance, if i have created a link describing a new shipping method that links directly to my shipping policy page, can this link be clicked and the page be automatically scrolled to the part of the page where my new shipping method is explained?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Do you need animation? That's somewhat difficult.
    Using a target is easy, though.

    http://my.com/page.htm#anchorname can be the link, from another page or the page you're currently on, and you can place this code on the destination page to make it work:
    <a name="anchorname"></a> [you can have text in there as well, though it's probably not needed.]
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •