Skip to content

Commit 891500f

Browse files
arthurvrgnarf
authored andcommitted
toggleClass: rename 'switch' variable
Closes gh-610 Fixes gh-581
1 parent 5a0192c commit 891500f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

entries/toggleClass.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
<argument name="className" type="String">
1313
<desc>One or more class names (separated by spaces) to be toggled for each element in the matched set.</desc>
1414
</argument>
15-
<argument name="switch" type="Boolean">
15+
<argument name="state" type="Boolean">
1616
<desc>A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.</desc>
1717
</argument>
1818
</signature>
1919
<signature>
2020
<added>1.4</added>
21-
<argument name="switch" optional="true" type="Boolean">
21+
<argument name="state" optional="true" type="Boolean">
2222
<desc>A boolean value to determine whether the class should be added or removed.</desc>
2323
</argument>
2424
</signature>
@@ -27,15 +27,15 @@
2727
<argument name="function" type="Function">
2828
<argument name="index" type="Integer" />
2929
<argument name="className" type="String" />
30-
<argument name="switch" type="Boolean" />
30+
<argument name="state" type="Boolean" />
3131
<return type="String" />
32-
<desc>A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.</desc>
32+
<desc>A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the state as arguments.</desc>
3333
</argument>
34-
<argument name="switch" optional="true" type="Boolean">
34+
<argument name="state" optional="true" type="Boolean">
3535
<desc>A boolean value to determine whether the class should be added or removed.</desc>
3636
</argument>
3737
</signature>
38-
<desc>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.</desc>
38+
<desc>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.</desc>
3939
<longdesc>
4040
<p>This method takes one or more class names as its parameter. In the first version, if an element in the matched set of elements already has the class, then it is removed; if an element does not have the class, then it is added. For example, we can apply <code>.toggleClass()</code> to a simple <code>&lt;div&gt;</code>: </p>
4141
<pre><code>

0 commit comments

Comments
 (0)