W3cubDocs

/jQuery Mobile

pageremove

pageremove eventversion added: 1.0, deprecated: 1.4.3

Description: Triggered just before the framework attempts to remove an external page from the DOM.

  • jQuery( ".selector" ).on( "pageremove", function( event ) { ... } )

By default, the framework removes any non active dynamically loaded external pages from the DOM as soon as the user navigates away to a different page. The pageremove event is dispatched just before the framework attempts to remove the page from the DOM.

This event is triggered just before the framework attempts to remove an external page from the DOM. Event callbacks can call preventDefault on the event object to prevent the page from being removed.

Note: The triggering of this event is deprecated as of jQuery Mobile 1.4.3. It will no longer be triggered in 1.6.0.

The replacement for pageremove is the pagecontainer widget's pagecontainerremove event. In jQuery Mobile >= 1.4.3, the two events are identical except for their name and the fact that pagecontainerremove is triggered on the pagecontainer, whereas pageremove is triggered on the page.

© The jQuery Foundation and other contributors
Licensed under the MIT License.
https://api.jquerymobile.com/pageremove