Reputation: 411
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
Reputation: 9103
Simply do not put ms
behind your time value.
$("#navbar-nav").toggle(2000);
Upvotes: 1
Reputation: 6598
remove ms
$(document).ready(function() {
// toggle
$("#navbar-btn").click(function() {
$("#navbar-nav").toggle(2000);
});
});
http://codepen.io/anon/pen/LVwdzW
Upvotes: 1