简体   繁体   中英

Twitter Bootstrap modals

I've been freaking out for two days with this...

I've set up a page with the Bootstrap CSS, with the following code in the page head:

<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>

In my body I have this:

<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>

In the Bootstrap docs this is what I have to do to get this working but when I click the button it doesn't do anything... I don't know what the problem is... I need urgent help

Thanks.

jQuery will need to be included first as the twitter bootstrap depends on it.

<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>    

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM