This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
plugin-eventsmethods.html
executable file
·130 lines (95 loc) · 2.79 KB
/
plugin-eventsmethods.html
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery Mobile Docs - Form Plugin Methods</title>
<link rel="stylesheet" href="../../themes/default" />
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
<script type="text/javascript" src="../../js/"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Form Plugin Methods</h1>
</div><!-- /header -->
<div data-role="content">
<p>After jQuery Mobile auto-enhances form controls into custom controls, you can manipulate many of their properties via plugin methods. The currently available methods are listed below. Check Github for updates - we're working on complete coverage.</p>
<h2>Selectmenu</h2>
<dl>
<dt>Methods</dt>
<dd><code>open</code> open a closed select menu</dd>
<dd>
<pre><code>
$('select').selectmenu('open');
</code></pre>
</dd>
<dd><code>close</code> close an open select menu</dd>
<dd>
<pre><code>
$('select').selectmenu('close');
</code></pre>
</dd>
<dd><code>refresh</code>: Update the custom menu to reflect the native select element's value. If the number of options in the select are different than the number of items in the custom menu, it'll rebuild the custom menu. Also, if you pass a true argument you can force the rebuild to happen.</dd>
<dd>
<pre><code>
//refresh value
$('select').selectmenu('refresh');
//refresh and force rebuild
$('select').selectmenu('refresh', true);
</code></pre>
</dd>
<dd><code>enable</code>: enable a disabled select.</dd>
<dd>
<pre><code>
$('select').selectmenu('enable');
</code></pre>
</dd>
<dd><code>disable</code>: disable a select.</dd>
<dd>
<pre><code>
$('select').selectmenu('disable');
</code></pre>
</dd>
</dl>
<h2>Textinput</h2>
<dl>
<dt>Methods</dt>
<dd><code>enable</code>: enable a disabled textinput/textarea.</dd>
<dd>
<pre><code>
$('input').textinput('enable');
</code></pre>
</dd>
<dd><code>disable</code>: disable a textinput/textarea.</dd>
<dd>
<pre><code>
$('textarea').textinput('disable');
</code></pre>
</dd>
</dl>
<h2>checkboxradio</h2>
<dl>
<dt>Methods</dt>
<dd><code>enable</code>: enable a disabled checkboxradio.</dd>
<dd>
<pre><code>
$('input').checkboxradio('enable');
</code></pre>
</dd>
<dd><code>disable</code>: disable a checkboxradio.</dd>
<dd>
<pre><code>
$('textarea').checkboxradio('disable');
</code></pre>
</dd>
<dd><code>refresh</code>: refresh a checkboxradio's value.</dd>
<dd>
<pre><code>
$('textarea').checkboxradio('refresh');
</code></pre>
</dd>
</dl>
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>