Unload event handler.
unloadevent is passed to the
windowobject whenever a user navigates away from a page for any of the following reasons:
- The user has clicked on an external link.
- The user has pressed the page reload button.
- The user has pressed the forward or back navigation buttons.
- The user has typed a new URL in the address bar.
- The user has closed the browser window.
- Whether the event is triggered often depends on the browser being used and can even vary in different versions of a particular browser.
This method was deprecated in jQuery 1.8.
|Bind an event handler to the |
|An object of data to pass to the event handler.|
|A function to execute each time the event is triggered.|
.unload( [eventData], handler(eventObject) ) Example
- This signature is a shortcut for
Bind an event handler to the
As soon as we navigate away from the page the