I’m using anchors for dealing with unique urls for an ajaxy website. However, I want to reload the content when the user hits the Browser’s “back” button so the contents always matches the url.
How can I achieve this? Is there a jQuery event triggering when user clicks “Back”?
You need to use a hashchange event. There are a couple of popular plugins. I’ve been using the address plugin and like it. Some will suggest BBQ also.
Address plugin
jQuery BBQ