HTML <button> popovertarget Attribute
Example
Refer to a popover element with the popovertarget attribute to show/hide the specified popover element:
<h1 popover id="myheader">Hello</h1>
<button popovertarget="myheader">Click me!<button>
Try it Yourself »
Definition and Usage
With the popovertarget
attribute you can refer to the popover element with the
specified id, and toggle between showing and hiding it:
Hello
Browser Support
Attribute | |||||
---|---|---|---|---|---|
popovertarget | 114 | 114 | Not supported | 17 | 100 |
Syntax
<button popovertarget="element_id">
Attribute Values
Value | Description |
---|---|
element_id | The id of the popover element related to this button |
Related Pages
HTML popover Attribute
HTML Button popovertargetaction Attribute
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.