jQuery unload event
<p>Is there any way to determine if the user clicked on a link, the forward or back button or entered a new URL in the address bar, in the following event?</p>

<pre><code>$(window).unload(function(e) {
    // here
}
</code></pre>
