jQuery(window).bind(‘beforeunload’,function(e){
//save info somewhere
return ‘are you sure you want to leave?’;
});
jQuery(window).unload(function(){
//I will call my method
});
jQuery(window).bind(‘beforeunload’,function(e){
//save info somewhere
return ‘are you sure you want to leave?’;
});
jQuery(window).unload(function(){
//I will call my method
});
Last articles