VOOZH about

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

⇱ Bootstrap 5 List group show() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 List group show() Method

Last Updated : 23 Jul, 2025

Bootstrap 5 List Group shows a series of content to the user. The show() method of the list group selects the given item and shows its corresponding pane and the previously selected list item becomes unselected and the pane of the previously selected item's pane becomes hidden. The show() method returns to the caller before the actual list item is selected on the front end.

Syntax:

const element = document.querySelector("#listItem-ID");
element.show();

Parameters: The list group show() method does not accept any parameters.

Return Value: This method does not return anything to the caller.

Example 1: This is a basic example illustrating the use of the show() method to make a tab visible.

Output:

Example 2: In this example, we used the JavaScript setInterval() and setTimeout() functions along with the popover show() method to periodically show each of the tabs.

Output:

Reference:https://getbootstrap.com/docs/5.0/components/list-group/#show

Comment

Explore