Here is what my code looks like, but the problem is that: when I click on the minimized button (the one that has 4 horizontal lines), it does not open the first time I click, but only on the second click. The first click does nothing, and the second quickly opens it, which quickly closes it, than opens it again. Why is this and how to fix it?
22
23 <div class="navbar navbar-fixed-top">
24 <div class="navbar-inner">
25 <div class="container">
26
27 <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
28 <span class="icon-bar"></span>
29 <span class="icon-bar"></span>
30 <span class="icon-bar"></span>
31 <span class="icon-bar"></span>
32 </a>
33
34 <%= link_to 'Synergy', root_path, :class => 'brand' %>
35
36 <div class="nav-collapse">
37
38 <% if current_user %>
39
40 <ul class="nav">
41 <li><%= link_to 'My projects', projects_path %></li>
42 <li><%= link_to current_user.name, '#' %></li>
43 <li><%= link_to 'Log out', destroy_user_session_path, :method => :delete %></li>
44 </ul>
45
46 <% else %>
47
48 <ul class="nav">
49 <li><%= link_to 'Sign in', new_user_session_path %></li>
50 <li><%= link_to 'Sign up!', new_user_registration_path %></li>
51 </ul>
52
53 <% end %>
54
55 </div>
56
57 </div>
58 </div>
59 </div>
60
EDIT: this is my application.js file:
13
14
15
16
17
source
share