【问题标题】:Bootstrap Modal Hide is not working at Laravel 7Bootstrap 模态隐藏在 Laravel 7 中不起作用
【发布时间】:2020-10-08 02:34:02
【问题描述】:

成功上传数据后点击“确定”时尝试关闭自动大写,但点击“确定”时大写没有关闭/隐藏

这是我的刀

complete:function(res){
                console.log(res);
                if(res.responseJSON !== undefined){
                    if(res.responseJSON.status === true){
                        table.ajax.reload();
                        Swal.fire({
                            title:'Success',
                            text:res.responseJSON.messages,
                            icon:'success'
                        }).then((done)=>{
                            if (done) {
                                resetForm() 
                                $("my-modal").modal("hide")
                                table.ajax.reload();
                            }
                        })
                    } else {

【问题讨论】:

  • $("my-modal").modal("hide") 中的“my-modal”是什么??
  • 如果“my-modal”是类使用“.my-modal”或者如果它是id使用“#my-modal”,它应该可以工作
  • "my-modal" 是 id,我更改 "$("#my-modal").modal("hide");"运行,并调用它,它工作

标签: javascript jquery laravel twitter-bootstrap modal-dialog


【解决方案1】:

您可以尝试替换 $("my-modal").modal("hide"); 经过 $("#my-modal").modal("toggle");

【讨论】:

    猜你喜欢
    • 2018-12-20
    • 2018-05-07
    • 2021-10-26
    • 2017-07-31
    • 1970-01-01
    • 1970-01-01
    • 2020-02-10
    • 1970-01-01
    • 2019-02-02
    相关资源
    最近更新 更多