Interactive Elements
popovertargetaction="toggle"
Alternates between showing and hiding the popover named by popovertarget. This is the default action for a compatible invoker when omitted or invalid. On compatible button and input controls with popovertarget; missing or invalid values default to toggle.
Formal Syntax & Structure
html syntaxhtml
popovertargetaction="toggle"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| popovertargetaction | keyword | Alternates between showing and hiding the popover named by popovertarget. This is the default action for a compatible invoker when omitted or invalid. |
| popovertarget | element ID | Identifies the popover to control. |
Working Example
Example Snippethtml
<button type="button" popovertarget="note" popovertargetaction="show">Open note</button><button type="button" popovertarget="note" popovertargetaction="toggle">Toggle note</button><div id="note" popover="manual">A contextual note.</div>