A
Show-Hide / Collapse-Expand Content

Add your custom JS functions to onclick events

Add your custom JS functions to onclick events

What it does

Add your custom JS functions to onclick events It is one of the abilities the Show-Hide / Collapse-Expand plugin exposes, so an AI agent connected to your site can run it for you.

Input schema

FieldTypeRequiredDescription
input string Required What you want this ability to do, in plain language.

Output schema

FieldTypeDescription
result string The result produced by the ability.

Permissions

The agent's WordPress user needs these capabilities. Grant only what's listed here, never a full admin account.

🔒 edit_posts

How an agent calls it

Agents call this ability by name and pass the inputs it needs. A call looks roughly like this:

show-hidecollapse-expand.add-your-custom-js-functions-to-onclick-
{
  "ability": "show-hidecollapse-expand.add-your-custom-js-functions-to-onclick-",
  "args": { "input": ... }
}

The agent runs the ability, then hands the result back for you to review before anything is published.

Keep exploring

More Show-Hide / Collapse-Expand abilities

All Show-Hide / Collapse-Expand abilities →
S
Set custom animation speed
Show-Hide / Collapse-Expand
Set custom animation speed
A
Add hidden answers to quizzes (answer opens on button click)
Show-Hide / Collapse-Expand
Add hidden answers to quizzes (answer opens on button click)