Skip to content

Commit 5279ba1

Browse files
committed
Merge pull request jquery-archive#2907 from eddiemonge/docs_fixes
Change some < to &gt;, fix some code examples
2 parents 13a0c15 + 503cefc commit 5279ba1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/forms/docs-forms.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h2>Hiding labels accessibly</h2>
4242
<p>For the sake of accessibility, jQuery Mobile requires that all form elements be paired with a meaningful <code>label</code>. To hide labels in a way that leaves them visible to assistive technologies—for example, when letting an element’s <code>placeholder</code> attribute serve as a label—apply the helper class <code>ui-hidden-accessible</code> to the label itself:</p>
4343
<code>
4444
<pre>
45-
&lt;label for="username" <strong>class="ui-hidden-accessible"</strong>>Username:&lt;/label&gt;
45+
&lt;label for="username" <strong>class="ui-hidden-accessible"</strong>&gt;Username:&lt;/label&gt;
4646
&lt;input type="text" name="username" id="username" value="" placeholder="Username"/&gt;
4747
</pre>
4848
</code>
@@ -52,7 +52,7 @@ <h2>Hiding labels accessibly</h2>
5252
<code>
5353
<pre>
5454
&lt;div data-role="fieldcontain" <strong>class="ui-hide-label"</strong>&gt;
55-
&lt;label for="username">Username:&lt;/label&gt;
55+
&lt;label for="username"&gt;Username:&lt;/label&gt;
5656
&lt;input type="text" name="username" id="username" value="" placeholder="Username"/&gt;
5757
&lt;/div&gt;
5858
</pre>
@@ -113,7 +113,7 @@ <h2>Field containers</h2>
113113
<p>For example:</p>
114114
<pre><code>
115115
&lt;div data-role=&quot;fieldcontain&quot;&gt;
116-
&lt;label for="name">Text Input:&lt;/label&gt;
116+
&lt;label for="name"&gt;Text Input:&lt;/label&gt;
117117
&lt;input type="text" name="name" id="name" value="" /&gt;
118118
&lt;/div&gt;
119119
</code></pre>
@@ -146,30 +146,30 @@ <h2>Refreshing form elements</h2>
146146
<h4>Checkboxes:</h4>
147147

148148
<code>
149-
$("input[type='checkbox']").attr("checked",true).checkboxradio("refresh");
149+
$("input[type='checkbox']").prop("checked",true).checkboxradio("refresh");
150150
</code>
151151

152152
<h4>Radios:</h4>
153153
<code>
154-
$("input[type='radio']").attr("checked",true).checkboxradio("refresh");
154+
$("input[type='radio']").prop("checked",true).checkboxradio("refresh");
155155
</code>
156156

157157
<h4>Selects:</h4>
158158
<code><pre>
159-
var myselect = $("select#foo");
159+
var myselect = $("#selectfoo");
160160
myselect[0].selectedIndex = 3;
161161
myselect.selectmenu("refresh");
162162
</pre></code>
163163

164164
<h4>Sliders:</h4>
165165
<code>
166-
$("input[type=range]").val(60).slider("refresh");
166+
$("input[type='range']").val(60).slider("refresh");
167167
</code>
168168

169169
<h4>Flip switches (they use slider):</h4>
170170

171171
<code><pre>
172-
var myswitch = $("select#bar");
172+
var myswitch = $("#selectbar");
173173
myswitch[0].selectedIndex = 1;
174174
myswitch.slider("refresh");
175175
</pre></code>

0 commit comments

Comments
 (0)