Skip to content

Commit 9df96fb

Browse files
committed
toggle: rename toggle(setShown) to toggle(display)
Fixes gh-655 Closes gh-666
1 parent 6ba2a3f commit 9df96fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

entries/toggle.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</signature>
2525
<signature>
2626
<added>1.3</added>
27-
<argument name="setShown" type="Boolean">
27+
<argument name="display" type="Boolean">
2828
<desc>Use <code>true</code> to show the element or <code>false</code> to hide it.</desc>
2929
</argument>
3030
</signature>
@@ -75,13 +75,13 @@ $( "#clickme" ).click(function() {
7575
<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:
7676
</p>
7777
<pre><code>
78-
$( "#foo" ).toggle( setShown );
78+
$( "#foo" ).toggle( display );
7979
</code></pre>
8080
<p>is equivalent to:</p>
8181
<pre><code>
82-
if ( setShown === true ) {
82+
if ( display === true ) {
8383
$( "#foo" ).show();
84-
} else if ( setShown === false ) {
84+
} else if ( display === false ) {
8585
$( "#foo" ).hide();
8686
}
8787
</code></pre>

0 commit comments

Comments
 (0)