{"id":88,"date":"2023-08-25T17:32:40","date_gmt":"2023-08-25T17:32:40","guid":{"rendered":"\/\/api.jquerymobile.com\/1.3\/?p=88"},"modified":"2023-08-25T17:32:40","modified_gmt":"2023-08-25T17:32:40","slug":"pagehide","status":"publish","type":"post","link":"https:\/\/api.jquerymobile.com\/1.3\/pagehide\/","title":{"rendered":"pagehide"},"content":{"rendered":"<article id=\"pagehide1\" class=\"entry event\"><h2 class=\"section-title\">\n<span>pagehide event<\/span><span class=\"version-details\">version added: 1.0<\/span>\n<\/h2>\n<div class=\"entry-wrapper\">\n<p class=\"desc\"><strong>Description: <\/strong>Triggered on the &quot;fromPage&quot; after the transition animation has completed.<\/p>\n<ul class=\"signatures\"><li class=\"signature\"><h4 class=\"name\">jQuery( &quot;.selector&quot; ).on( &quot;pagehide&quot;, function( event ) { ... } )<\/h4><\/li><\/ul>\n<div class=\"longdesc\" id=\"entry-longdesc\">\n\t\t<p>Callbacks for this event will receive a data object as their 2nd arg. This data object has the following properties on it: <\/p>\n\t\t<ul>\n\t\t\t<li>\n<code>nextPage<\/code> (object)\n\t\t\t\t<ul>\n\t\t\t\t\t<li>A jQuery collection object that contains the page DOM element that we just transitioned to.<\/li>\n\t\t\t\t<\/ul>\n\t\t\t<\/li>\n\t\t<\/ul>\n\t\t<p>Note that this event will not be dispatched during the transition of the first page at application startup since there is no previously active page.<\/p>\n\t\t<p>You can access the <code>prevPage<\/code> or <code>nextPage<\/code> properties via the second argument of a bound callback function. For example: <\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n2\">2<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n3\">3<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n4\">4<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n5\">5<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n6\">6<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n7\">7<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;div&quot;<\/span> ).on( <span class=\"hljs-string\">&quot;pageshow&quot;<\/span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"> event, ui <\/span>) <\/span>{<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  alert( <span class=\"hljs-string\">&quot;This page was just hidden: &quot;<\/span> + ui.prevPage );<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>});<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code> <\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;div&quot;<\/span> ).on( <span class=\"hljs-string\">&quot;pagehide&quot;<\/span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"> event, ui <\/span>) <\/span>{<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  alert( <span class=\"hljs-string\">&quot;This page was just shown: &quot;<\/span> + ui.nextPage );<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>});<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t<p>Also, for these handlers to be invoked during the initial page load, you must bind them before jQuery Mobile executes.  This can be done in the <code>mobileinit<\/code> handler, as described on the global config page.<\/p>\n\n\t<\/div>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>Triggered on the &#8220;fromPage&#8221; after the transition animation has completed.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-events"],"_links":{"self":[{"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":1,"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":89,"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/posts\/88\/revisions\/89"}],"wp:attachment":[{"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jquerymobile.com\/1.3\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}