testerius
testerius

Reputation: 411

Responsive navbar toggle doesn't work properly

I'd like to ask you for help. I want to make responsive navbar similar to Bootstrap's navbar but it doesn't work as I expected.

Here is demo http://codepen.io/anon/pen/vOodMg

jQuery:

$(document).ready(function() {
  // toggle
  $("#navbar-btn").click(function() {
    $("#navbar-nav").toggle(2000);
  });
});

Any suggestions?

Edit: Previous issue was fixed but there is responsive issue. If you click button for expand links then click again to hide and resize screen links don't appear. So what should I do?

Upvotes: 2

Views: 119

Answers (3)

Amit singh
Amit singh

Reputation: 2036

Remove ms from 2000ms from your jquery code

Upvotes: 0

oshell
oshell

Reputation: 9103

Simply do not put ms behind your time value.

$("#navbar-nav").toggle(2000);

Upvotes: 1

Nafees Anwar
Nafees Anwar

Reputation: 6598

remove ms

$(document).ready(function() {
  // toggle
  $("#navbar-btn").click(function() {
  $("#navbar-nav").toggle(2000);
  });
});

http://codepen.io/anon/pen/LVwdzW

Upvotes: 1

Related Questions