这是我的 index.jade 文件
.navbar.navbar-fixed-top
.navbar-inner
。容器
.brand #{title}
。容器
。排
.hero-unit
h1 #{标题}
p 板球奇幻游戏,您可以在其中选择。
a.btn(data-toggle="modal", href="#myModal") 启动
div.modal.hide(id="myModal")
.modal-header
按钮(类型=“按钮”,类=“关闭”,数据关闭=“模态”)x
h3 模态标题
.modal-body
p 一个精致的身体...
.modal-footer
这是我的 layout.jade 文件
!!!
html
头
标题=标题
链接(rel='样式表',href='/libs/bootstrap/css/bootstrap.css')
链接(rel='样式表',href='/libs/bootstrap/css/bootstrap.min.css')
链接(rel='stylesheet', href='/libs/bootstrap/css/bootstrap-responsive.min.css')
链接(rel='样式表',href='/stylesheets/style.css')
身体!=身体
脚本(src="/libs/bootstrap/js/bootstrap.js")
我有其他引导元素工作,但无法遵循以下说明 - “您可以轻松激活页面上的模式,而无需编写单行 javascript。只需在具有数据目标的控制器元素上设置 data-toggle="modal" ="#foo" 或 href="#foo" 对应于模态元素 id,当点击时,它将启动你的模态。
我怎样才能做到这一点 ?