HTML5 developing mobile Web Applications-jquery Mobile (1)

Source: Internet
Author: User

JQuery Mobile is an easy-to-use Web mobile app development framework. Use it just as you would with jquery, by introducing the necessary files.

The structure code of the most basic jquery mobile file is as follows:

<body><div data-role= "page" id= "Pageone" >  <div data-role= "header" >    
Based on the example above, let's look at it first. The usage of the main jquery mobile framework.

1, Data-role

With Data-role, we are able to define the role of a part of the page. jquery Mobile, in accordance with the defined values, will proactively parse it to set the corresponding style or function. In the code above. We first defined a div that data-role as page, indicating that the DIV and all its internal components are a separate page (which will be explained later). After that, it is a very common structure definition in the Mobile page: header, content, and footer, and they each implement the definition of their roles through Data-role.

2. Full HTML

As can be seen, JQuery Mobile in the implementation of the page layout in the form of HTML+CSS, the special table depends on the definition of the label, and we previously learned the Sencha Touch framework is very different. This determines that jquery mobile is easier to use and less expensive to learn: there is no complicated loading mechanism, there is no huge JavaScript code, and just the definition of tags inside the HTML enables the basic layout of the page.

3, the use of the ID

We have also defined an ID for page. In jquery Mobile, the ID is not often used in medicine. It has a very big role is to achieve the conversion of the page.

The ID indicates the page. You can go to the specified interface by invoking it on the jump.

HTML5 developing mobile Web Applications-jquery Mobile (1)

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.