VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-popovers-enable-method/

⇱ Bootstrap 5 Popovers enable() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Popovers enable() Method

Last Updated : 23 Jul, 2025

Bootstrap 5 Popovers are a feature that allows you to add small overlays of content to a page. They are typically used to provide additional information or to display a menu when a user hovers over or clicks on a specific element on the page. We can also pass the header and content in a popover.

Bootstrap 5 Popovers enable() method:

It is used to enable the element’s popover to be displayed.

Syntax:

popover.enable()

Return Value: This method enables the element’s popover to be displayed

Let us understand more about this using example

Example 1: In this example, we will learn about enable() method.

Output:

Example 2: In this example, we will see the working of disable() with enable() method. When we will disable a popover, the popover will not appear. To enable the popover, we need to enable it by clicking the button.

Output:

Reference: https://getbootstrap.com/docs/5.0/components/popovers/#enable

Comment

Explore