I am using Rails 3.2 and the twitter-bootsrap-rails gem (link).
I have a modal, this is the html.erb:
<div id="myModal" class="modal hide fade in" style="display: block;">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3><%= t '.add_category_title' %></h3>
</div>
<div class="modal-body">
<%= render :partial => 'wgform' %>
</div>
</div>
this modal should be hidden when the page loads, and triggered with a button:
<a class="btn" href="#myModal" data-toggle="modal"><%= t '.add_category_btn' %></a>
but for some reason, the modal appear when the page loads, with css attribute “display:block;” (it should be “display:none;”).
The “X” on the top right works right to dismiss it, and the button correctly shows the modal (if clicked after closing it).
The strange thing is that all was working one hour ago, and I didn’t modified that file.
I’m stuck, don’t know where to look.
Solved editing bootstrap.js.coffee (see the comments above).
bootstrap.js.coffee: