模态链接不';第二次它不工作';使用jquery和twitter引导单击

模态链接不';第二次它不工作';使用jquery和twitter引导单击,jquery,twitter-bootstrap,playframework-2.0,modal-dialog,Jquery,Twitter Bootstrap,Playframework 2.0,Modal Dialog,我在DataTables jquery插件中显示了一些数据。我有一个隐藏模式,设置html,然后在用户单击表行编辑它时显示。它在第一次单击时工作,但是在那之后,除非重新加载页面,否则它不会打开模式。我在下面包含#modal editUser的行中得到错误:“Uncaught TypeError:undefined不是函数” 我的点击: <script style="text/javascript"> $(document).on('click', '.edit-record'

我在DataTables jquery插件中显示了一些数据。我有一个隐藏模式,设置html,然后在用户单击表行编辑它时显示。它在第一次单击时工作,但是在那之后,除非重新加载页面,否则它不会打开模式。我在下面包含#modal editUser的行中得到错误:“Uncaught TypeError:undefined不是函数”

我的点击:

<script style="text/javascript">
    $(document).on('click', '.edit-record', function(e) {
        alert("edit contact" + $("#modal-editUser"));
        e.preventDefault();
        $(".modal-editUser-body").html('');
        $(".modal-editUser-body").addClass('loader');
        $("#modal-editUser").modal('show');

        $.post('@routes.Application.postEditContactDetails()',
                {id: $(this).attr('data-id') },
                function(html) {
                    $(".modal-editUser-body").removeClass('loader');
                    $(".modal-editUser-body").html(html);
                }
        );
    });
</script>

$(文档)。在('单击','上。编辑记录',函数(e){
警报(“编辑联系人”+$(“模态编辑用户”);
e、 预防默认值();
$(“.modal editUser body”).html(“”);
$(“.modal editUser body”).addClass('loader');
$(“#modal editUser”).modal('show');
$.post('@routes.Application.postEditContactDetails(),
{id:$(this.attr('data-id')},
函数(html){
$(“.modal editUser body”).removeClass('loader');
$(“.modal editUser body”).html(html);
}
);
});
和隐藏模式:

<div id="modal-editUser" class="hide">
    <div class="modal-editUser-body">
        <p> This is the modal body.</p>
    </div>
</div>

这是模态体


你用什么javascript来隐藏模式?@joshhunt这可能是问题所在,我所拥有的只是模式页脚中的以下内容:
Close Create$('modal editUser')的操作。在('click','.btn primary',函数(e){$('modal editUser')。modal('hide'))
?也许最好设置一个提琴或显示一个示例页面,这样我就可以看到发生了什么?我会给它一个快照,如果它不起作用,就发布一个提琴,谢谢!这似乎是由于我在模式中包含了一个脚本:
当我遥控它时,它工作了。可能与引导程序的一些冲突导致它停止工作。