Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling Thumbnails

Status
Not open for further replies.

dranium

Technical User
Mar 9, 2009
15
CA
Hello,

I have a gallery website that is currently only on my localhost, unfortunately I cannot provide a link. I am currently using this script for my thumbnails to scroll left and right. Everything is working great when I click on the thumbnail I can see my expanded image but the problem is the scrolling thumbnails go back to the starting point after the page reloads. I have over 150 thumbnails and its a pain to scroll all the way back to the right side to go back to where I was. Is there a way I can make this script remember it's last position?

Thank you in advance.
 
The only way I can think of is to store the current location in a cookie and update it everytime the user clicks next/previous. When the page is reloaded, check the value in the cookie - if it's set, you'll know exactly where the user was and can move the script over accordingly.

If the cookie is not set, start at the beginning.

Set the cookie to expire after 24hrs so the user is forced to start at the beginning the next day they visit. or you can just leave it for x number of days so the user always starts at the last position no matter when they return.



--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top