I’ve a backbone app where I wanna open an overlay wich is just a page with its on url. You can also navigate in this overlay with different pages/urls. So when the overlay is closed I wanna set back the hash to the state before the overlay was opened. As the overlay is opened by a link I can’t get the hash from the state before.
So is there a way to get the previous hash when a hash changed?
The hashchange event has a “oldURL” field…. store all the “oldURL” (or only the last one) and, when you need it, change the actual url with the last url.
Source: https://developer.mozilla.org/en/DOM/window.onhashchange