How to use browser back-button functionality with JavaScript
Use jQuery BBQ plugin in combination with hash change plugin to listen for window has change events.
Let’s assume that you have a button with an ID of ‘button’. Let’s assume it does something useful like close a pop-up but it can do anything really.
e.g.
1: //listen for hash tag changes [...]