i want to call a function when browser back button is clicked. bellows code is working for internet explorer but not for chrome. i dont know whats wrong with this.
jQuery(document).ready(function($) {
if (window.history && window.history.pushState) {
window.history.pushState('forward', null, './#forward');
$(window).on('popstate', function() {
alert('dcu');
window.location.href = "competition";
});
}
});
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire