VOOZH about

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

⇱ Bootstrap 5 Tooltips show() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Tooltips show() Method

Last Updated : 23 Jul, 2025

Bootstrap 5 Tooltip is a UI element that shows some extra information when the user hovers over or focuses on a tooltip-enabled element. The Tooltip show() method is used to show an element's tooltip. The Tooltip having the zero title length will not be visible.

Syntax:

const tooltip = new bootstrap.Tooltip(document.getElementById('tooltip-id'));
tooltip.show();

Parameters: This method does not accept any parameter.

Return Value: This method returns to the caller before the tooltip has been revealed to the front end.

Example 1: In this example, we used the show() method to reveal the tooltip of an element.

Output:

👁 a2

Example 2: In this example, we used the tooltip's show() method along with the hide() method to show/hide the tooltip.

Output:

👁 a2

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

Comment

Explore