How to Create Hover Nav Tabs in Bootstrap 5, 4, and 3

Last Updated on January 1, 2025 by Roshan Parihar

Learn how to create hover nav tabs using Bootstrap 5 and its other version. The short answer is to use the mouseover event with show() function.

The tab menus may contain multiple tabs options which on click displays its relevant content by default. Let’s find out how you display it on hover.

Display Nav Tabs on Hover in Bootstrap 5

Nav tabs by default, display the content on tab click. Bootstrap 5 start using javascript and that’s why you have to just add some javascript code as given below.

Test it Live

Output

Display Nav Tabs on Hover in Bootstrap 5

It uses the mouseover event of Javascript with show() to get the desired output.

You can click the output above to see the live editor with the nav tabs to display its content on hover.

Hover Nav Tabs in Bootstrap 4

There can be different way to create nav tabs in Bootstrap 4. You have to first create nav tabs with the code given below. After that, use some jQuery as given below to create hover tabs in Bootstrap 4.

Test it Live

Output

Hover Nav Tabs in Bootstrap 4

When you click the output given above, you will get the live editor with nav tabs. You can hover over the tabs to see its relevant content.

Create this in Bootstrap 3

Bootstap 3 is the oldest version but still using by many users to create nav tabs. You can create hover tab by just adding some jQuery code as given below.

Test it Live

Output

Create this in Bootstrap 3

To see the live result, you can click output given above. After that, hover over the nav tabs to see its content.