Can't make the Bootstrap navbar toggle button work

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

Here’s your error from Developer’s Tools

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

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

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

Make sure that Jquery is on top of Bootstrap.

1 Like

Yess!! It’s working now. @alecaceaes you’re a life saver.:+1::+1:

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

JQuery is a pre-requisite for Bootstrap. :slight_smile:

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