Single Page Navigation w/ Javascript and Back Button
- by Khan
Ok, so I have a "navigation" div and "content" div.
When something on the navigation is clicked, I fade in the content div with the new data.
Now, I would like to have the old data returned when the user hits the "back" button on his/her browser, but I'm having a hard time doing this.
I know I can set the content to be a named anchor, so they stay on the same page with a breadcrumb trail. However, that's as far as I get. Can I listen for a back button click? Can I set content to display when a certain anchor name is reached?
Thanks in advance for your help, SO.