# Can't make the Bootstrap navbar toggle button work

**URL:** <https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170>\
**Category:** General\
**Created:** [November 9, 2017, 8:05am UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170 "2017-11-09T08:05:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![debu2code](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/debu2code/32/67923_2.png) [@debu2code](https://forum.freecodecamp.org/u/debu2code)\
**Post date:** [November 9, 2017, 8:05am UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170/1 "2017-11-09T08:05:04Z")

</div>

I’m building the navigation manu for my Portfolio page project. But I just can’t make the toggle button work on smaller screens. I’ve done the following-

1. Checked that BS js and jQuery is included properly.
2. Checked that `.collapsed` class is attached to the `<button>`
3. Double checked the whole `nav` section code.

But still I could not find the mistake. Am I missing something?

Please help. Here’s the Codepen link- [https://codepen.io/debu2code/pen/yzZPWY](https://codepen.io/debu2code/pen/yzZPWY)

---

<div class="post-metadata">

**Author:** ![alecaceaes](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/alecaceaes/32/160822_2.png) [@alecaceaes](https://forum.freecodecamp.org/u/alecaceaes)\
**Post date:** [November 9, 2017, 8:36am UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170/2 "2017-11-09T08:36:11Z")

</div>

Here’s your error from Developer’s Tools

Uncaught Error: Bootstrap’s JavaScript requires jQuery  
at bootstrap.min.js:6

---

<div class="post-metadata">

**Author:** ![debu2code](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/debu2code/32/67923_2.png) [@debu2code](https://forum.freecodecamp.org/u/debu2code)\
**Post date:** [November 9, 2017, 8:40am UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170/3 "2017-11-09T08:40:09Z")

</div>

Thanks for helping @alecaceaes. But I didn’t understand the error. What should I do to avoid it?

---

<div class="post-metadata">

**Author:** ![alecaceaes](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/alecaceaes/32/160822_2.png) [@alecaceaes](https://forum.freecodecamp.org/u/alecaceaes)\
**Post date:** [November 9, 2017, 8:42am UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170/4 "2017-11-09T08:42:58Z")

</div>

On codepen, click the settings button then on the Javascript Tab, Quick add JQuery.

Make sure that Jquery is on top of Bootstrap.

---

<div class="post-metadata">

**Author:** ![debu2code](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/debu2code/32/67923_2.png) [@debu2code](https://forum.freecodecamp.org/u/debu2code)\
**Post date:** [November 9, 2017, 8:48am UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170/5 "2017-11-09T08:48:22Z")

</div>

Yess!! It’s working now. @alecaceaes you’re a life saver.👍👍

I had included jQuery after BS js. Can you please explain why that didn’t work?

---

<div class="post-metadata">

**Author:** ![alecaceaes](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/alecaceaes/32/160822_2.png) [@alecaceaes](https://forum.freecodecamp.org/u/alecaceaes)\
**Post date:** [November 9, 2017, 8:54am UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170/6 "2017-11-09T08:54:33Z")

</div>

JQuery is a pre-requisite for Bootstrap. 🙂

---

<div class="post-metadata">

**Author:** ![debu2code](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/debu2code/32/67923_2.png) [@debu2code](https://forum.freecodecamp.org/u/debu2code)\
**Post date:** [November 9, 2017, 8:59am UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170/7 "2017-11-09T08:59:26Z")

</div>

Understood. Thanks again for helping. I can submit my project now and move ahead.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:35pm UTC](https://forum.freecodecamp.org/t/cant-make-the-bootstrap-navbar-toggle-button-work/158170/8 "2021-01-17T20:35:19Z")

</div>

Closed on January 17, 2021, 8:35pm UTC


