【发布时间】:2014-02-28 09:09:14
【问题描述】:
我的 html 代码为:
<button class="btn btn-default" id="openForm">
New
</button>
<!-- Modal -->
<div class="modal fade hide" id="formModal">
<div class="modal-header">
<h4>
Form
</h4>
</div>
<div class="modal-body" id="formModalBody">
</div>
<div class="modal-footer">
<a href="#" data-dismiss="modal" class="btn">Close</a>
</div>
</div>
我的 Java 脚本如下:
$(document).on('click', '#openForm', function(e) {
e.preventDefault();
$("#formModalBody").html("");
$("#formModal").modal('show');
$.post('index.php/customers/view/-1/',
{id: -1},
function (html) {
$("#formModalBody").html(html);
}
);
});
我正在使用 Twitter Bootstrap 和 Codeignitor。上面的post url是index.php/Controller/function
当我点击按钮时;我看不到引导模式。页面淡入,但没有可见的模式。
【问题讨论】:
标签: php jquery ajax codeigniter twitter-bootstrap