I’m using bootstrap’s modal plugin in rails
The website says I can gain the function without write javascript.
I add the following line in my HTML(in slim):
div#makeDream.modal.hide.fade
div.modal-header
a.close data-dismiss='modal'
h3 Hello World!
div.modal-body
div.modal-footer
a data-toggle='modal' data-target='#makeDream' Button
However, after I clicking the Button. the modal shows up, but immediately disappears!
I found the css of #makeDream has
display:none
I don’t where it comes
Can someone tell me how to fix it?
I had this problem and the solution was simple… I was loading both bootstrap.js AND bootstrap-modal.js.
bootstrap.js includes bootstrap-modal.js.
Solution: Remove bootstrap-modal.js from your
headand it’ll work correctly.