jQuery Mobile : Loading Pages in Background
Learn how to determine the current page and loading pages in the Background
jQuery Mobile: Determining the Current Page
The jQuery Mobile $.mobile.activePage is used to determine the current page being displayed.
The script uses the id value obtained via the activePage property as an argument for changePage Method
Example: jQuery Mobile - Determining the Current PageGive it a TRY! » Note: The activePage property is used to return a jQuery Object containing the current page.
jQuery Mobile: Loading Pages in the Background
Prefetching of pages can also be performed using jQuery Mobile loadPage method, to load documents in the background without displaying it to the user.
The method loadPage accepts two arguments, first is the URL of the document to be loaded, while second is an optional setting.
Syntax: jQuery Mobile Loading Pages in the BackgroundGive it a TRY! » Note: The effect is not that notice able on a static page, and much more pronounced on a dynamic page.
jQuery Mobile: Controlling the Load Dialog
A dialog box displays a statement when the jQuery Mobile loads a document from a remote server for duration longer than 50 milliseconds.
jQuery Mobile allows you to configure and change the period after which the dialog box is displayed by setting a value for loadMsgDelay property.
Syntax: jQuery Mobile Controlling the Load Dialog BoxGive it a TRY! » Note: The page for 100 milliseconds before displaying the message.
jQuery Mobile: Disabling the Loading Dialog
The Dialog Box can be disabled by setting a value of false for showLoadMsg property.