提问者:小点点

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


这是我的索引.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

这是我的布局.Jade文件

!!!
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")

我有其他的引导元素在工作,但无法按照以下说明操作--“您可以轻松地激活页面上的模态,而不需要编写一行JavaScript。只需在controller元素上设置data-toggle=”modal“,该元素的data-target=”#foo“或href=”#foo“对应于一个模态元素id,当单击它时,它将启动您的模态。”

我怎么能那样做?


共1个答案

匿名用户

在layout.jade文件中包含jquery库