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)