Data Attributes full (ok)

https://api.jquerymobile.com/data-attribute/

Link dung js chuan: https://themeroller.jquerymobile.com/

Data attribute reference

The jQuery Mobile framework uses HTML5 data- attributes to allow for markup-based initialization and configuration of widgets. These attributes are completely optional; calling plugins manually and passing options directly is also supported. To avoid naming conflicts with other plugins or frameworks that also use data- attributes, set a custom namespace by modifying the ns global option.

https://demos.jquerymobile.com/1.4.5/button-markup/

Links with data-role="button". Input-based buttons, links in toolbars and button elements are auto-enhanced, no data-role required.

V1: data-role="button" data-icon="plus"

C:\xampp\htdocs\oec\index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
    <script src="https://code.jquery.com/jquery.js"></script>
    <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
  </head>
  <body>
    <div role="main">
      <a href="choose.html" data-role="button" data-icon="plus">button</a>
    </div><!-- /content -->
  </body>
</html>

V2: data-role="button" data-icon="plus" data-iconpos="right" data-inline="true"

C:\xampp\htdocs\oec\index.html

V3: data-role="button" data-icon="plus" data-iconpos="right" data-inline="true" data-theme="e"

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/checkboxradio-checkbox/

Pairs of labels and inputs with type="checkbox" are auto-enhanced, no data-role required

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/collapsible/

A heading and content wrapped in a container with the data-role="collapsible"

V1: data-role="collapsible" data-collapsed="false" data-collapsed-icon="carat-d" data-expanded-icon="carat-u"

C:\xampp\htdocs\oec\index.html

V2: data-role="collapsible" data-collapsed="true" data-collapsed-icon="carat-d" data-expanded-icon="carat-u"

https://demos.jquerymobile.com/1.4.5/collapsibleset/

A number of collapsibles wrapped in a container with the data-role="collapsibleset"

V1: data-role="collapsibleset" data-theme="a" data-content-theme="b"

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/controlgroup/

DIV or FIELDSET container with data-role="controlgroup". Visually integrate multiple button-styled elements.

V1: data-role="controlgroup"

C:\xampp\htdocs\oec\index.html

V2: data-role="controlgroup" data-type="horizontal"

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.2.1/docs/pages/dialog/index.html

V1: data-role="button" data-inline="true" data-rel="dialog" data-transition="pop" C:\xampp\htdocs\oec\index.html

C:\xampp\htdocs\oec\dialog.html

https://demos.jquerymobile.com/1.4.5/slider-flipswitch/

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/listview/

OL or UL with data-role="listview"

C:\xampp\htdocs\oec\index.html

LI within a listview

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/pages/

Container with data-role="page"

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/popup

V1: data-rel="popup" > data-role="popup"

C:\xampp\htdocs\oec\index.html

V2: data-rel="popup" > data-rel="back"

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/checkboxradio-radio

Pairs of labels and inputs with type="radio" are auto-enhanced, no data-role required

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/selectmenu

All select form elements are auto-enhanced, no data-role required

C:\xampp\htdocs\oec\index.html

Inputs with type="range" are auto-enhanced, no data-role required

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/textinput/

Input type="text|number|search|etc." or textarea elements are auto-enhanced, no data-role required

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/toolbar/

The toolbar widget is used to enhance headers and footers.

C:\xampp\htdocs\oec\index.html

https://demos.jquerymobile.com/1.4.5/toolbar-fixed/

Container with data-role="header" or data-role="footer" plus the attribute data-position="fixed"

C:\xampp\htdocs\oec\index.html

Last updated

Was this helpful?