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