window.onpopstate for android?
<p>Im making a mobile optimised website that has fullscreen dialog windows that open when you 'click' certain elements on the page. These windows are actually just divs that are animated into position. </p>

<p>If the user presses the browser back button when one of these dialoge windows is open I want the dialoge box to close, not for the page to be left all together.</p>

<p>I can do this with iPhone. If I make the element you click a link fragment, then on the  window.onpopstate event I can use window.location.href to check the url and hide the dialoge box if appropriate. </p>

<p>However I cant get this to work on Android as window.onpopstate isn't supported (at least with the phone im testing with which is quite old). How can I get round this? jQuery Mobile can do this, so I know it must be possible somehow.</p>

<p>Thanks </p>
