João Pereira
João Pereira

Reputation: 31

Responsive Navbar wont collapse

I'm working on a simple website with Bootstrap but I can't put the navbar working on responsive design. https://www.codeply.com/p/Jsz9jsiAqm I've searched for solutions, my data-target seems to be just as everybody do and still when I click the button it does nothing.

Thanks!

Upvotes: 0

Views: 39

Answers (2)

lautaro gonzalez
lautaro gonzalez

Reputation: 19

Maybe with the wrapper

<div class="d-flex toggled" id="wrapper">

and put a script like this

$(window).resize(function(e) {
      if($(window).width()<=768){
        $("#wrapper").removeClass("toggled");
      }else{
        $("#wrapper").addClass("toggled");
      }
    });

Check this page https://mmenujs.com/docs/wrappers/bootstrap.html

Upvotes: 1

Yogesh
Yogesh

Reputation: 386

Your code had collaspe instead of collapse in the data-toggle attribute.

Here's the updated code :- https://www.codeply.com/p/iowuSN2BGh

Upvotes: 2

Related Questions