![]() |
VOOZH | about |
Bootstrap 5 Popover is a feature of Bootstrap that allow you to display a small popup over the element when an element is clicked or hovered over.
Bootstrap 5 Popovers Using function with popperConfig Options: Popover popperConfig option is used to customize the behavior of the popover. The popperConfig option is an object that contains a set of options and modifiers that control the placement and behavior of the popover.
Syntax :
var popover = new bootstrap.Popover(element, {
popperConfig: function (defaultBsPopperConfig) {
}
})
Example 1: In this example, we place the popover on the right of element by using the popperConfig option.
Output:
Example 2: In this example, we will pass various popover options using the popperConfig option.
Output :
Reference: https://getbootstrap.com/docs/5.0/components/popovers/#using-function-with-popperconfig