Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions entries/toggle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
</signature>
<signature>
<added>1.3</added>
<argument name="showOrHide" type="Boolean">
<desc>A Boolean indicating whether to show or hide the elements.</desc>
<argument name="setShown" type="Boolean">
<desc>Use <code>true</code> to show the element or <code>false</code> to hide it.</desc>
</argument>
</signature>

Expand Down Expand Up @@ -75,13 +75,13 @@ $( "#clickme" ).click(function() {
<p>The second version of the method accepts a Boolean parameter. If this parameter is <code>true</code>, then the matched elements are shown; if <code>false</code>, the elements are hidden. In essence, the statement:
</p>
<pre><code>
$( "#foo" ).toggle( showOrHide );
$( "#foo" ).toggle( setShown );
</code></pre>
<p>is equivalent to:</p>
<pre><code>
if ( showOrHide === true ) {
if ( setShown === true ) {
$( "#foo" ).show();
} else if ( showOrHide === false ) {
} else if ( setShown === false ) {
$( "#foo" ).hide();
}
</code></pre>
Expand Down