Help needed with text scroll + cookies

Discussion in 'JavaScript' started by tutie, Apr 5, 2009.

  1. #1
    hi all.

    I got a div text scroller, only thing i need is a way to save the position of the text so when someone refreshes it continues on the same place before page refresh ( with cookies ).. anyone can help me with this? a snippet?

    thx
     
    tutie, Apr 5, 2009 IP
  2. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use the scrollx and scrolly properties of the div, save them in a cookie. When the page reloads check for the cookie and if it exists you can set them to whatever they were before. You can use the onscroll event trigger to capture change of the scroll position.
     
    xlcho, Apr 10, 2009 IP