title: jQuery bind beforeunload - not working with IE 9
body: <p>I have a piece of code i want fired when the page closes (basically, send a 'disconnected' message to the server. The execution should be fast enough for me not to have to cancel and restart the event. Further to that, it works perfectly in Chrome, Firefox and Safari, but not in IE9 on closing the tab. If i navigate to another page in IE9, my event fires. If i close the tab, it doesn't.
  I tried the following to bind my code:</p>
  
  <pre><code>jQuery(window).bind("beforeunload", function() { DoSomeWork(); });
  </code></pre>
  
  <p>i also tried replacing jQuery with $ like so:</p>
  
  <pre><code>$(window).bind("beforeunload", function() { DoSomeWork(); });
  </code></pre>
  
  <p>Still works in Chrome, but does not work in IE. 
  Any suggestions?</p>
  
  <p>I am using jquery 1.9.1 min (compressed production version).</p>