JQuery Mobile Development

Source: Internet
Author: User

1. including JavaScript files in the

2. Note: The only limitation to creating your own definition of the Data-property is that the property's own definition portion is at least one character long and cannot contain uppercase letters.

The 3.jQuery mobile framework can only display one page at a time, using the Data-title property to dynamically change the page title.

<! DOCTYPE html>

4. Creating the main dialog box form with jquery Mobile is very easy. Just use the Data-rel property on whatever link anchor tag, and set its value to dialog.

<! DOCTYPE html>

5. Many of the INPUT element types are actively enhanced by the jquery mobile itself as a button. This contains input elements whose type attributes are set to Button,submit,reset or image, and their default appearance is the same. The only way to change this default enhancement is to set Data-role to none.

<! DOCTYPE html>

 

<! DOCTYPE html>

The 6.jQuery mobile framework cleverly cuts the navbar space evenly based on the number of buttons. The only thing to note is that if they include more than 5 hyperlinks, they will start winding to multiple lines. This is somewhat of a limitation, but it is also desirable because the mobile device does not have enough horizontal space to accommodate so many buttons.

<! DOCTYPE html>

7. Grid rows-Each element with the Ui-block-a class voluntarily clears the line and creates a new row. Looking at the actual CSS used for the Ui-block-a class included in the jquery mobile framework, you'll find it clears the left float.

<! DOCTYPE html>


8. To add collapsible data-role to the container, the caption element is actively converted to a button, which can be used to expand and close the paragraph.

<! DOCTYPE html>


9. To define a collapsible panel, you must create a container element that includes a set of collapsible content areas. On this container element, the Data-role must be set to the Collapsible-set value.

<! DOCTYPE html>


JQuery Mobile added a value to the ListView Data-role property in the start tag of an unordered list element to enhance these list elements.

<! DOCTYPE html>


The

11.jQuery Mobile framework makes it easy to include a search filter bar in the list: Simply add a Data-filter property to the list and set the value to True to The ability to change the default text with an attached property data-filter-placeholder, which is used for the start element of an ordered list or unordered list.

<! DOCTYPE html>


12. Add Highlight data-highlight= "true" for the scroll bar

<label for= "My-slider" >my slider</label><input type= "range" name= "slider" id= "My-slider" value= "50" min= "0" max= "step=" data-highlight= "true" >


13. Toggle Switch data-role= "Slider"

<label for= "Flip-switch" >do you like Pizza?</label><select name= "Flip-switch" id= "Flip-switch" data-role= "Slider" data-highlight= "true" ><option value= "yes" >yes</option><option value= "no" > No</option></select>


14.jQuery Mobile has a theme system that includes 5 samples defined by the letter "a" to "E". Samples can be mixed and matched on a single Web page, agreeing to be completely self-defined, using samples very easy, just using the Data-theme attribute.

<a href= "#" data-role= "button" Data-theme= "a" >swatch a</a><a href= "#" data-role= "button" Data-theme= "b ">swatch b</a><a href=" # "data-role=" button "Data-theme=" C ">swatch c</a><a href=" # "Data-role = "button" data-theme= "D" >swatch d</a><a href= "#" data-role= "button" Data-theme= "E" >swatch e</a>


15.jQuery Mobile includes an initialization event named Mobileinit, which is loaded before the Document.ready event for JQuery. This allows you to override and extend the default global options for jquery Mobile, as well as start all your own definitions. In order to extend the Mobileinit event, you must correctly arrange the sequence of JavaScript. You have to include your own definition of the JavaScript event handler before the jquery framework loads before the jquery mobile is loaded.


JQuery Mobile Development

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.