I'm trying to detect when the user hits the "back" button in their browser.
When clicking on the link and then getting back, nothing happens:
<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
<script>
$( window ).on( "navigate", function( event, data ) {
console.log( data.state );
});
</script>
<a href="http://www.google.com">Link</a>
I was expecting a message in the log.
When the user checks some checkboxes, then go to another page and then returns back, I want to reset the form, so that all checkboxes are empty.