> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Method name: toggleEffects(effects: Array<string>)

# Method package: w

# Method menu location: w --> Effects --> toggleEffects

# Method Link: https://dev.wix.com/docs/velo/velo-only-apis/$w/effects/toggle-effects.md

# Method Description:

Toggles the state of one or more of an element's effects.

This function toggles the state of the effects specified in the function call.
This means that if an effect included in the call was previously applied, it's removed and is no longer visible on your site. If
an effect included in the call wasn't previously applied, it's applied when you call the function and becomes visible on your site.

You can find the names of the effects defined for an element using the [`allEffects`](#allEffects) property.

The Effects panel in Wix Studio has two sections, **Adjust** and **Design**, that allow you to adjust the appearance of an element or change its design characteristics.
You can't simultaneously apply 2 effects that both change properties in the same section. 
If you try to do this, only one of the effects is visible on your site. 
You can, however, apply 1 effect that changes the **Adjust** properties and another effect that changes the **Design** properties simultaneously.

For example, effects for text elements allow changes to these properties:

![](/effects_UI.png "Create Effect Panel")

If you create 2 effects that each change properties in the **Adjust** section and try to apply them together, only
one is visible on your site. The same is true for 2 effects that change properties in the **Design** section.

>**Note:**
>This function can only be used in Wix Studio.



# Method Code Examples:

*** Note: do not assume any prop names or enum values other than the ones in the example.

## Toggle one of an element's effects

```javascript
$w('#myElement').effects.toggleEffects(['My Effect']);
```

## Toggle several of an element's effects

```javascript
$w('#myElement').effects.toggleEffects(['My Effect 1', 'My Effect 2']);
```

## Toggle an element's effect every 3 seconds

```javascript
$w.onReady(() => {
  // ...
  setInterval(() => {
    $w('#myElement').effects.toggleEffects(['My Effect']);
  }, 3000);
})
```

---