Tabs Widget
Tabs
The jQuery UI tabs widget is bundled unchanged with jQuery Mobile. Thus, its API documentation fully describes its functionality.
Options and autoinitialization
When used with jQuery Mobile's autoinitialization features, the options documented on the widget's API documentation page can also be provided as data-*
attributes in the markup. You can add the data-role="tabs"
attribute to your tabs widget markup to indicate that the element is to be turned into a tabs widget.
Ajax considerations
jQuery Mobile provides an extension to the tabs widget (tabs.ajax
). The extension provides no new API, however, it modifies the way in which the widget evaluates whether displaying the content referred to by the href
attributes of the links that play the role of tabs requires retrieval via Ajax. It is necessary to include this extension if your project consists of multiple external jQuery Mobile pages, one of which features a tabs widget.
Example:
A basic example of tabs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
|