> 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

## Resource: About Static Event Handlers

## Article: About Static Event Handlers

## Article Link: https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/about-static-event-handlers.md

## Article Content:

# About Static Event Handlers

<blockquote class="caution">
  <strong>Deprecation Notice:</strong>
  
  This feature is deprecated but will continue to work as expected. Switch to [dynamic event handlers](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/add-an-event-handler.md) for your current and future projects. Unlike static event handlers, dynamic event handlers can be added or removed using methods like `$w('#myButton').onClick()`. While static event handlers are still supported for existing sites, we recommend using dynamic event handlers going forward. 
</blockquote>

A static event handler is predefined and is linked to a specific event. The function can’t be dynamically modified or removed programmatically during execution. 

**Sample static event handler:**

```js
export function myButton_click(event) {
  console.log('Button clicked');
}
```

## Migrate from static to dynamic event handlers

To migrate a static event handler to a dynamic one:

1. Open the Properties & Events panel for the element with the static event handler.
2. Find the event you want to migrate and click the yellow lightning bolt icon next to the event handler name.
3. Click the **Migrate [eventName] event** link that appears.

After migration, your code updates from the old static format to the new dynamic format. For example:

**Old format:**

```js
export function myButton_click(event) {
	// Existing code 
}
```

**New format:**

```js
$w('#myButton').onClick((event) => {
 	// Existing code
});
```

## Delete a static event handler 
You can no longer use the Properties & Events panel to delete static event handlers. To delete a static event handler, delete the generated code from the page code file.

## See also
+ [About Event Handlers in Wix](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/about-event-handlers-in-wix.md).
+ [Add an Event Handler](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/add-an-event-handler.md).
+ [About the Properties & Events Panel](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/velo-workspace/properties-events-panel/working-with-the-properties-events-panel.md).