Can't make the Bootstrap navbar toggle button work

Can't make the Bootstrap navbar toggle button work
0.0 0

#1

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


#2

Here’s your error from Developer’s Tools

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


#3

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


#4

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

Make sure that Jquery is on top of Bootstrap.


#5

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?


#6

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


#7

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