VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-tooltips-dispose-method/

⇱ Bootstrap 5 Tooltips dispose() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Tooltips dispose() Method

Last Updated : 31 Jul, 2024

Bootstrap 5 Tooltips dispose() method is used to manually destroy a tooltip. This can be useful if you want to dynamically create and destroy tooltips based on certain conditions or events in your web application.

Syntax:

tooltip.dispose()

Example 1: In this example, if the user hovers the cursor on the button element, the tooltip will appear. If the user hovers on the element the tooltip will destroy which will never appear until the user refreshes the screen.

Output :

Example 2: In this example, if the user hovers the cursor on the button element, the tooltip will appear.  If the user clicks on the element the tooltip will destroy which will never appear until the user refreshes the screen.

Output:

Reference:https://getbootstrap.com/docs/5.0/components/tooltips/#dispose

Comment
Article Tags:

Explore