【问题标题】:Twitter Bootstrap modalsTwitter Bootstrap 模式
【发布时间】:2012-02-14 13:34:09
【问题描述】:

我已经被这个吓坏了两天......

我已经使用 Bootstrap CSS 设置了一个页面,页面标题中包含以下代码:

<link rel="stylesheet" href="bootstrap.min.css">
<script type="text/javascript" src="http://openclassifieds.googlecode.com/svn-history/r119/branches/2.0/themes/twitter/js/bootstrap-modal.js"></script>
<script type="text/javascript" src="http://openclassifieds.googlecode.com/svn-history/r119/branches/2.0/themes/twitter/js/bootstrap-transition.js"></script>    
<script type="text/javascript" src="http://openclassifieds.googlecode.com/svn-history/r119/branches/2.0/themes/twitter/js/jquery.js"></script>

我的身体里有这个:

<button class="btn btn-large btn-primary" data-toggle="modal" data-target="#modal-signin" data-backdrop="true" data-keyboard="true">Launch Modal</button>

<div id="modal-signin" class="modal hide fade">
    <div class="modal-header">
        <a href="#" class="close" data-dismiss="modal">×</a>
        <h2>Sign in <small>or sign up</small></h2>
    </div>
    <div class="modal-body">
        <h3>Teste</h3>
    </div>
</div>

在 Bootstrap 文档中,这是我必须做的才能使其正常工作,但是当我单击按钮时,它什么也没做...... 我不知道问题是什么... 我需要紧急帮助

谢谢。

【问题讨论】:

    标签: javascript jquery css twitter-bootstrap


    【解决方案1】:

    首先需要包含 jQuery,因为 twitter 引导程序依赖于它。

    <script type="text/javascript" src="http://openclassifieds.googlecode.com/svn-history/r119/branches/2.0/themes/twitter/js/jquery.js"></script>
    <script type="text/javascript" src="http://openclassifieds.googlecode.com/svn-history/r119/branches/2.0/themes/twitter/js/bootstrap-modal.js"></script>
    <script type="text/javascript" src="http://openclassifieds.googlecode.com/svn-history/r119/branches/2.0/themes/twitter/js/bootstrap-transition.js"></script>    
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-14
      • 2014-06-15
      • 2012-09-20
      • 1970-01-01
      • 1970-01-01
      • 2014-02-10
      相关资源
      最近更新 更多