我在rails中使用bootstrap的模式插件
网站说我可以获得这个功能,而不写javascript。
我在我的HTML(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
但是,我点击按钮后。模态出现,但立即消失!
我发现#makeDream的CSS
display:none
我不在哪里来
有人可以告诉我如何解决它吗?
解决方法
我有这个问题,解决方案很简单…我加载了bootstrap.js和bootstrap-modal.js。
bootstrap.js包括bootstrap-modal.js。
解决方案:从头上删除bootstrap-modal.js,它会正常工作。