JQueryMobile development method and Utility

Source: Internet
Author: User
$. Mobile. changePage (method) can be programmed to change from one page to another. this method is used to jump between pages and appears in the form of clicking a link or submitting a form (when those features are enabled ). argumentsto ◆ String, url :( about/us.html) ◆ jQuery object ($ (# about) ◆ one specified two

$. Mobile. changePage (method)

This method can be programmed to change from one page to another. It is used to jump between pages and appears in the form of clicking a link or submitting a form (when those features are enabled ).

Arguments

To

◆ String, url: ("about/us.html ")

◆ JQuery object ($ ("# about "))

◆ An array [from, to] with two page references specified to jump to a known page. From is the page that can be viewed currently (or $. mobile. activePage ).

◆ Object for sending form data. ({to: url, data: serialized form data, type: "get" or "post "}

Transition (string, transition effect: "pop", "slide", "" none ")

Reverse (boolean, default: false). Setting true will lead to a redirection.

ChangeHash (boolean, default: true). When the page change is complete, the URLhash of the page is updated.

Example:

// Jump to the "about us" page with the slideup Effect

$. Mobile. changePage ("about/us.html", "slideup ");

// Go to the "search results" Page and submit the form data with the id of "search ".

$. Mobile. changePage ({

Url: "searchresults. php ",

Type: "get ",

Data: $ ("form # search"). serialize ()

});

// Jump to the "confirm" page with the pop effect without recording its history in the url hash

$. Mobile. changePage ("../alerts/confirm.html", "pop", false, false );

$. Mobile. pageLoading (method)

Display or hide a page load message. The message is configured by $. mobile. loadingMessage.

Arguments:

Done (boolean, false by default, which means loading has started). Setting this parameter to True will hide page loading messages.

Example:

// Prompt page loading

$. Mobile. pageLoading ();

// Hide page loading

$. Mobile. pageLoading (true );

$. Mobile. path (methods, properties)

Utilities for getting, setting, and manipulating url paths. TODO: document as public API is finalized.

$. Mobile. base (methods, properties)

Utilities for working with generated base element. TODO: document as public API is finalized.

$. Mobile. silentScroll (method)

Scroll on the Y axis without triggering the scroll event handler.

Arguments:

YPos (number, default value: 0). pass any number to scroll on Y coordinate.

Example:

// Scroll 100px on Y

$. Mobile. silentScroll (100 );

$. Mobile. addResolutionBreakpoints (method)

Adding the width break point for min/max width class is added to the HTML element. when the screen or browser width reaches a certain range, container elements will be broken. For example, when the width is 480, two radiobutton columns will be arranged in a row, and the width is changed to 320, two radiobutton columns may be automatically broken into two rows)

Arguments:

Values (number or array). pass any number or number array.

Example:

// Add a PX resolution breakpoint

$. Mobile. addResolutionBreakpoints (400 );

// Add two resolution breakpoints

$. Mobile. addResolutionBreakpoints ([600,800]);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.