Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/jquery/jquery-mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
jblas committed Nov 1, 2011
2 parents e056d20 + 5279ba1 commit 8c81959
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions docs/forms/docs-forms.html
Expand Up @@ -42,7 +42,7 @@ <h2>Hiding labels accessibly</h2>
<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>
<code>
<pre>
&lt;label for="username" <strong>class="ui-hidden-accessible"</strong>>Username:&lt;/label&gt;
&lt;label for="username" <strong>class="ui-hidden-accessible"</strong>&gt;Username:&lt;/label&gt;
&lt;input type="text" name="username" id="username" value="" placeholder="Username"/&gt;
</pre>
</code>
Expand All @@ -52,7 +52,7 @@ <h2>Hiding labels accessibly</h2>
<code>
<pre>
&lt;div data-role="fieldcontain" <strong>class="ui-hide-label"</strong>&gt;
&lt;label for="username">Username:&lt;/label&gt;
&lt;label for="username"&gt;Username:&lt;/label&gt;
&lt;input type="text" name="username" id="username" value="" placeholder="Username"/&gt;
&lt;/div&gt;
</pre>
Expand Down Expand Up @@ -113,7 +113,7 @@ <h2>Field containers</h2>
<p>For example:</p>
<pre><code>
&lt;div data-role=&quot;fieldcontain&quot;&gt;
&lt;label for="name">Text Input:&lt;/label&gt;
&lt;label for="name"&gt;Text Input:&lt;/label&gt;
&lt;input type="text" name="name" id="name" value="" /&gt;
&lt;/div&gt;
</code></pre>
Expand Down Expand Up @@ -146,30 +146,30 @@ <h2>Refreshing form elements</h2>
<h4>Checkboxes:</h4>

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

<h4>Radios:</h4>
<code>
$("input[type='radio']").attr("checked",true).checkboxradio("refresh");
$("input[type='radio']").prop("checked",true).checkboxradio("refresh");
</code>

<h4>Selects:</h4>
<code><pre>
var myselect = $("select#foo");
var myselect = $("#selectfoo");
myselect[0].selectedIndex = 3;
myselect.selectmenu("refresh");
</pre></code>

<h4>Sliders:</h4>
<code>
$("input[type=range]").val(60).slider("refresh");
$("input[type='range']").val(60).slider("refresh");
</code>

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

<code><pre>
var myswitch = $("select#bar");
var myswitch = $("#selectbar");
myswitch[0].selectedIndex = 1;
myswitch.slider("refresh");
</pre></code>
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.mobile.forms.checkboxradio.js
Expand Up @@ -95,7 +95,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
input
.bind({
vmousedown: function() {
this._cacheVals();
self._cacheVals();
},

vclick: function() {
Expand Down

0 comments on commit 8c81959

Please sign in to comment.