title: How can I delay leaving a page via javascript?
body: <p>I'm trying to get add a delay of 1000ms before a person leaved the page. I'm using the beforeunload event to start a jquery animation and would like it to finish before the page leaves.</p>
  
  <p>I'm not concerned with older browsers, IE9, latest safari, chrome and FF4 are all i'm interested in.</p>
  
  <p><strong>Edit:</strong> Well I was hoping to implement it when just navigating internal pages. Sure I can make all my internal links a javascript call, but I would have preferred a less brute force method.</p>
  
  <p>Also, I'm not stopping people from leaving the page, not even making them wait a huge long time, 1 second for a fade out? Thats no worse than every game I play fading out when I select quit.</p>
  
  <p>Now had I asked how do I prevent a person from leaving a page, then yes all the "don't do it" would have been deserved.</p>