Search...
removeEffects( )
Removes one or more of an element's effects.
Description
This function removes an element's previously applied effects. Once you remove an effect, it's unapplied from an element and is no longer visible on your site.
You can find the names of the effects defined for an element using the allEffects
property.
Note: This function can only be used in Editor X.
Syntax
function removeEffects(effects: Array<string>): void
removeEffects Parameters
NAME
TYPE
DESCRIPTION
effects
Array<string>
The names of the effects to remove. These are the names defined when creating the effects.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
Remove one of an element's effects
Copy Code
1$w('#myElement').effects.removeEffects(['My Effect']);
Remove several of an element's effects
Copy Code
1$w('#myElement').effects.removeEffects(['My Effect 1', 'My Effect 2']);
Remove an element's effect when a button is double-clicked
Copy Code
1$w('#myButton').onDblClick(() => {2 $w('#myElement').effects.removeEffects(['My Effect']);3})