我需要顯示使用引導模板報名形式模態窗口。JQuery的引導模式對話框
我的樣本應當通過按[R]元件被打開,但它不是。在本例中(http://www.w3resource.com/twitter-bootstrap/modals-tutorial.php),但它的作用。
屬性似乎沒有在我的例子正確地工作:
data-toggle="modal"
爲什麼?
代碼: http://jsfiddle.net/Mfc7M/
<!DOCTYPE html>
<title>Twitter Bootstrap Modals Example</title>
<body>
<div id="reg-model-dialog" class="modal hide fade in" style="display: none; ">
<div class="modal-header"> <a class="close" data-dismiss="modal">×</a>
<h3>Registration</h3>
</div>
<div class="modal-body">
<table id="search-tbl">
<tr>
<td>Email:</td>
<td>
<input type="text" name="reg-email" id="reg-email" />
</td>
</tr>
<tr>
<td>Password:</td>
<td>
<input type="text" name="reg-pwd" id="reg-pwd" value="" />
</td>
</tr>
</table>
</div>
<div class="modal-footer"> <a href="#" class="btn btn-success">Call to action</a> <a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
</div> <a data-toggle="modal" href="#regstration" class="btn btn-primary btn-large" id="reg-dialog-btn">R</a>
和
$(document).ready(function() {
//$("#reg-model-dialog").modal();
/* $('#reg-dialog-btn').click(function(){
$('#reg-model-dialog').css('display','inline');
}); */
});