navigate event

A wrapper event for both hashchange and popstate The navigate event is a wrapper around both the hashchange and popstate events. In addition to providing a single event for all browsers it also provides a data object in both cases allowing for the unification of handlers. This feature is used by the $.mobile.navigate method to include directionality and URL information.

Types

Types JavaScript provides several built-in datatypes. In addition to those, this page documents virtual types like Selectors, enhanced pseudo-types like Events and some concepts you need to know about Functions. If you want to study these concepts in depth, take a look at MDN. You should be able to try out most of the examples below by just copying them to your browser's JavaScript Console (Chrome, Safari with Develop menu activated, IE 8+) or Firebug console (Firefox). Whenever an example

Configuring Defaults

Configuring Defaults Working with jQuery Mobile's Auto-initialization Unlike other jQuery projects, such as jQuery and jQuery UI, jQuery Mobile automatically applies many markup enhancements as soon as it loads (long before the document.ready event fires). These enhancements are applied based on jQuery Mobile's default settings, which are designed to work with common scenarios. If changes to the settings are needed, they are easy to configure. The mobileinit event When jQuery Mobile starts, it

jQuery.mobile.path.makePathAbsolute()

Utility method for converting a relative file or directory path into an absolute path. Given a path that is relative to another absolute path, this utility will convert the relative path to an absolute path based on the given absolute path. jQuery.mobile.path.makePathAbsolute( relPath, absPath ) relPath

jQuery.mobile.activePage

Reference to the page currently in view. Note: jQuery.mobile.activePage is deprecated as of jQuery Mobile 1.4.0 and will be removed in 1.5.0. Use the getActivePage() method from the pagecontainer widget instead.

jQuery.mobile.path.getDocumentUrl()

Utility method for retrieving the URL of the original document. jQuery.mobile.path.getDocumentUrl( asParsedObject ) asParsedObject (default: false) Boolean The function normally returns the original document's URL as a string. However, if you specify a truthy value for this parameter, the origi

jQuery.mobile.path.isAbsoluteUrl()

Utility method for determining if a URL is absolute. Utility method for determining if a URL is absolute. This function returns a boolean true if the URL is absolute, false if not. jQuery.mobile.path.isAbsoluteUrl( url ) url String

jQuery.mobile.getDocumentBase()

Utility method for retrieving the original document base URL. jQuery.mobile.getDocumentBase( asParsedObject ) asParsedObject (default: false) Boolean The function normally returns the original document base URL as a string. However, if you specify a truthy value for this parameter, the original

jQuery.isPlainObject()

Check to see if an object is a plain object (created using "{}" or "new Object"). Note: Host objects (or objects used by browser host environments to complete the execution environment of ECMAScript) have a number of inconsistencies which are difficult to robustly feature detect cross-platform. As a result of this, $.isPlainObject() may evaluate inconsistently across browsers in certain instances. An example of this is a test against document.location

.jqmData()

Store arbitrary data associated with the specified element. Returns the value that was set. When working with jQuery Mobile, jqmData should be used in place of jQuery core's data method (note that this includes $.fn.data, $.fn.removeData, and the $.data, $.removeData, and $.hasData utilities), as they automatically incorporate getting and setting of namespaced data attributes (even if no namespace is currently in use). Arguments: See jQuery's