jQuery Mobile pagebeforehide
Event
Example
Display a text message before the old page hides after a page transition:
Definition and Usage
The pagebeforehide
event is triggered before the old page hides after a page transition.
Related Events:
- pagehide - Triggered after the old page hides after a page transition.
- pagebeforeshow - Triggered before the new page shows after a page transition.
- pageshow - Triggered after the new page shows after a page transition.
Note: This event is triggered at the start/end of the page transition.
Syntax
Trigger all page events in jQuery Mobile:
Trigger a specific page event:
Parameter | Description |
---|---|
function(event, data) | Required. Specifies the function to execute when the pagebeforehide event is triggered. The function includes the following two parameters: <br> Event object - Includes any jQuery event properties (event.target, event.type, etc.). For more information, refer to the <br> jQuery Event Reference <br> <br> Data object - Contains properties <br> nextPage, the transition page to return to. |
page | Optional. Specifies the page ID to which the pagebeforehide event is directed. For internal pages, use #id. For external pages, use externalfile.html. |