Bootstrap nav-toggler closes instantly

Bootstrap nav-toggler closes instantly
0.0 0

#1

Hey guys,

I’m trying to get this Bootstrap 4 nav-toggler to work, but every time i toggle the button it instantly collapses again.

Here is a codpen:


#2

You have an outdated script for Bootstrap. The style sheet you are using is v4.1.1 but the script is 3.3.7

This is the CDN you need:

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>