Is it possible to prevent a browser window closing using jQuery? I've tried this:
$(document.ready(function() {
$(window).unload(function(e) {
e.preventDefault();
alert("Not closing");
});
});
The alert works but the window closes anyway.