SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to have a link save it's last scrolled location?

    Sorry for asking such a newbie and confusing question. I'm not a web developer and don't do any web design, but instead I do graphic design, so pardon the question if it doesn't make sense.

    What I'm trying to figure out is the following. Let's say I want to create a website where the main navigation buttons are lets say on the left side. Then each time I click on a button in the main navigation section, it opens the content in the same page. Now some of these buttons in the main navigation section will open up scrollable content. Let's say I click on button "A" then scroll down the page. Then without scrolling back up, I click on button "B" in the main navigation section. At some point I want to click back on button "A" but I want the content to show exactly where I had left off previously without taking me back to the top of the page. Is this possible?

    I appreciate the feedback!

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by corser1 View Post
    At some point I want to click back on button "A" but I want the content to show exactly where I had left off previously without taking me back to the top of the page. Is this possible?
    Yes, that is definitely possible. All that's needed is to save the value for how far the page has scrolled, and when someone goes back to that page to retrieve that value and scroll the page to that value.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •