2

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?

3
  • your jquery has error Commented Aug 25, 2015 at 10:12
  • Yes, fixed this issue but generally navbar doesn't work as Bootstrap's. There is probably issue with responsive toggle. Commented Aug 25, 2015 at 10:14
  • its working fine after removing ms from that jquery code Commented Aug 25, 2015 at 10:16

3 Answers 3

1

remove ms

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

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

Sign up to request clarification or add additional context in comments.

3 Comments

Yes, fixed this issue but generally navbar doesn't work as Bootstrap's. There is probably issue with responsive toggle.
make your time value 500
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? Any suggestions? Hmm?
1

Simply do not put ms behind your time value.

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

1 Comment

Yes, fixed this issue but generally navbar doesn't work as Bootstrap's. There is probably issue with responsive toggle.
0

Remove ms from 2000ms from your jquery code

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.