-
Notifications
You must be signed in to change notification settings - Fork 0
.addModifier()
esr360 edited this page May 1, 2019
·
4 revisions
Add one or more modifiers to each element in the set of matched elements
.addModifier(modifier, config);.add().addModifiers()
| Param | Type | Info |
|---|---|---|
modifier |
(String|Array) |
The modifier(s) to add to each element in the set of matched elements |
[config] |
Object |
The configuration to use when calling the method (learn more) |
<div class="button" id="alpha">Button</div>sQuery('#alpha').addModifier('active');<div class="button-active" id="alpha">Button</div><div class="button" id="alpha">Button</div>Note the use of
.addModifiers()alias
sQuery('#alpha').addModifiers(['disabled', 'error']);<div class="button-disabled-error" id="alpha">Button</div>