PageShowHideEvents Enum

Whenever a page is shown or hidden in jQuery Mobile, two events are triggered on that page. The events triggered depend on whether that page is being shown or hidden, so when a page transition occurs, there are actually 4 events triggered: 2 for each page. Note that all four of these events expose a reference to either the next page (nextPage) or previous page (prevPage), depending on whether the page is being shown or hidden, and whether that next or previous page exists (the first ever page shown does not have a previous page to reference, but an empty jQuery object is provided just the same). You can access this reference via the second argument of a bound callback function.

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 mobileinit handler, as described on the global config page.

Namespace: SharpKit.jQueryMobile

Base Types

System.Enum

Base Interfaces

System.IConvertible
System.IFormattable
System.IComparable

Fields

Name Description
pagebeforehide Triggered on the page being hidden, before its transition begins.
pagebeforeshow Triggered on the page being shown, before its transition begins.
pagehide Triggered on the page being hidden, after its transition completes.
pageshow Triggered on the page being shown, after its transition completes.

Remarks

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 mobileinit handler, as described on the global config page.

Examples

$('div').live('pageshow',function(event, ui){alert('This page was just hidden: '+ ui.prevPage);});
$('div').live('pagehide',function(event, ui){alert('This page was just shown: '+ ui.nextPage);});
            
© Copyright 2005-2011 SharpKit. All rights reserved.