detect back button in android
$(window).on(“navigate”, function (event, data) { var direction = data.state.direction; if (direction == ‘back’) { // do something } if (direction == ‘forward’) { // do something else }});
$(window).on(“navigate”, function (event, data) { var direction = data.state.direction; if (direction == ‘back’) { // do something } if (direction == ‘forward’) { // do something else }});