[JQuery Mobile] jQuery Mobile syntax cheat sheet

Insert picture description here
I recently borrowed the book "Learning Cross-platform Web Design Second Edition" from the library of my alma mater. It is very well written. I read through it and I am familiar with it and I don’t need to borrow it again. However, some of the jQuery Mobile syntax tables have a quick reference value. Therefore, the functions tested in the notes before synthesis are organized as follows, for reference:

  1. Data-role attribute value list:

jQuery Mobile uses HTML5's data-* attribute function to customize a set of data-role custom attributes. All components and layout of jQuery Mobile are controlled and typeset by data-role:

Insert picture description here

For pages other than the first page, the header can be added with data-add-back-btn="true" attribute to add a back button, but the default is "Back", which can be modified with data-back-btn-text="return".

The div block set as controlgroup can use data-type=“horizontal” to control the horizontal arrangement of the components in the container.

The hyper-link button can be set with data-inline=“true” to set the width without occupying the screen width (can accommodate text/icons), so that the buttons are not arranged in separate rows (but more than 5 will still jump).

The list element can be set with data-inset=“true” to set the list indentation without occupying the full width of the screen. The list item (li element) can be added with data-role=“list-divider” attribute as a classification item, add data-filter = "True" you can add a search box above it.

  1. Button icons (data-icon and data-iconpost):

​Data-icon attribute value description action action alert attention arrow-l left arrow arrow-d down arrow arrow-dl down left arrow arrow-dr down right arrow arrow-r right arrow arrow-u up arrow arrow-ul up left arrow arrow -ur up right arrow audio audio back back bars horizontal bars bullets bullet calendar calendar camera camera carat-d down carat-l left carat-r right

carat-u check down to select clock clock cloud cloud comment comment delete delete edit edit eye forbidden forward forbidden forward gear gear (usually used for setting) grid grid heart love home home page info message location location lock lock mail email

navigation guide phone phone minus minus plus plus power power recycle recycling refresh refresh search search shop shopping star star tag label user user video audio

data-iconpos attribute value Description left button icon on the left right button icon on the right top button icon on the bottom button icon on the bottom notext no text (only the button icon is displayed)

3. Theme scenery (data-theme and data-overlay-theme):

data-[overlay-]theme attribute value Description a Default theme ab Alternative theme bc~z Custom theme c~z

  1. Data-transition:

Data-transition attribute value description fade Fade in effect (default) flip flow The original page is zoomed out, the new page is zoomed in and then zoomed in none No special effects pop The new page pops out Expand slide The original page slides out from right to left, and the new page slides out from right to right Slide left into slidedown The original page slides out from top to bottom, the new page slides in from top to slidefade The original page fades out from right to left, the new page fades in from right to left slideup The original page slides out from bottom to top, and the new page slides out from bottom to top In turn, take the center of the page as the axis to transform

  1. Hyperlink button action attribute data-rel:

This attribute is used in the action of the Hyperlink button:

data-rel attribute value description popup pops out the message window dialog opens the dialog box back goes back to the previous page external goes to external resources

jQuery Mobile uses Ajax by default when using the Hyperlink button to switch pages. When the page is moved out, it will be put into the temporary storage area to improve performance. However, for those who need to dynamically update from the database, it will cause the data to be out of time. You can use data-ajax. = "False" attribute to turn off Ajax.

Guess you like

Origin blog.csdn.net/wlcs_6305/article/details/114526650