Categories
JavaScript Answers

How to close Bootstrap dropdown after link click with HTML?

Spread the love

Sometimes, we want to close Bootstrap dropdown after link click with HTML.

In this article, we’ll look at how to close Bootstrap dropdown after link click with HTML.

How to close Bootstrap dropdown after link click with HTML?

To close Bootstrap dropdown after link click with HTML, we add the dropdown-toggle class.

For instance, we write

<a class="dropdown-toggle"></a>

to add the dropdown-toggle class to the link to close Bootstrap dropdown after link click with HTML.

Conclusion

To close Bootstrap dropdown after link click with HTML, we add the dropdown-toggle class.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *