popOverToggleTarget

Creates a trigger element that toggles an associated pop-up between shown and hidden states.

Published on Updated on

The popOverToggleTarget property of the HTMLInputElement and HTMLButtonElement interfaces creates a trigger element that toggles an associated pop-up between shown and hidden states. It is the DOM definition of the HTML popovertoggletarget attribute.

Value

A string value equal to the ID of the pop-up element that you want to toggle, to associate the two.

Example

const popup = document.getElementById('my-popup-btn');

// get
popup.popOverToggleTarget;

// set
popup.popOverToggleTarget = 'my-popup';

Browser compatibility

See also

Updated on Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.