Node.js 如何让twitter引导模式在node js express中工作?

Node.js 如何让twitter引导模式在node js express中工作?,node.js,twitter-bootstrap,express,Node.js,Twitter Bootstrap,Express,这是我的index.jade文件 .navbar.navbar-fixed-top .navbar-inner .container .brand #{title} .container .row .hero-unit h1 #{title} p Cricket fantasy game where you can be selecto

这是我的index.jade文件

.navbar.navbar-fixed-top .navbar-inner .container .brand #{title} .container .row .hero-unit h1 #{title} p Cricket fantasy game where you can be selector. a.btn(data-toggle="modal", href="#myModal") Launch div.modal.hide(id="myModal") .modal-header button(type="button", class="close", data-dismiss="modal") x h3 Modal Header .modal-body p One fine body... .modal-footer !!! html head title= title link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap.css') link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap.min.css') link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap-responsive.min.css') link(rel='stylesheet', href='/stylesheets/style.css') body!= body script(src="/libs/bootstrap/js/bootstrap.js") .navbar.navbar-fixed-top .导航栏内部 .集装箱 .品牌#{title} .集装箱 一行 .英雄单位 h1#{title} 板球奇幻游戏,你可以选择。 a、 btn(数据切换=“模态”,href=“#myModal”)启动 div.modal.hide(id=“myModal”) .模态标题 按钮(type=“button”、class=“close”、data dismission=“modal”)x h3模态头 .模态体 一个好身体。。。 .模态页脚 这是我的layout.jade文件

.navbar.navbar-fixed-top .navbar-inner .container .brand #{title} .container .row .hero-unit h1 #{title} p Cricket fantasy game where you can be selector. a.btn(data-toggle="modal", href="#myModal") Launch div.modal.hide(id="myModal") .modal-header button(type="button", class="close", data-dismiss="modal") x h3 Modal Header .modal-body p One fine body... .modal-footer !!! html head title= title link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap.css') link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap.min.css') link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap-responsive.min.css') link(rel='stylesheet', href='/stylesheets/style.css') body!= body script(src="/libs/bootstrap/js/bootstrap.js") !!! html 头 头衔 链接(rel='stylesheet',href='/libs/bootstrap/css/bootstrap.css') 链接(rel='stylesheet',href='/libs/bootstrap/css/bootstrap.min.css') 链接(rel='stylesheet',href='/libs/bootstrap/css/bootstrap responsive.min.css') 链接(rel='stylesheet',href='/stylesheets/style.css') 身体!=身体 脚本(src=“/libs/bootstrap/js/bootstrap.js”) 我有其他引导元素工作,但无法按照以下说明操作-“您可以轻松激活页面上的modals,而无需编写一行javascript。只需在具有数据目标=“#foo”或href=“#foo”的控制器元素上设置data toggle=“modal”它对应于模态元素id,单击时,它将启动模态元素id


如何才能做到这一点?

在layout.jade文件中包含jquery库

在引导之前添加jquery:

.navbar.navbar-fixed-top .navbar-inner .container .brand #{title} .container .row .hero-unit h1 #{title} p Cricket fantasy game where you can be selector. a.btn(data-toggle="modal", href="#myModal") Launch div.modal.hide(id="myModal") .modal-header button(type="button", class="close", data-dismiss="modal") x h3 Modal Header .modal-body p One fine body... .modal-footer !!! html head title= title link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap.css') link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap.min.css') link(rel='stylesheet', href='/libs/bootstrap/css/bootstrap-responsive.min.css') link(rel='stylesheet', href='/stylesheets/style.css') body!= body script(src="/libs/bootstrap/js/bootstrap.js")
script(src="https://code.jquery.com/jquery-3.2.1.min.js")

假设您有
bootstrap modal.js
(完整的js或单独的),我认为它应该可以工作。我的bootstrap.js在/libs/bootstrap/js中,但是当您下载bootstrap时,您是否选中了包含所有js组件的框?解决方案是什么?