莫代尔出现然后消失 - laravel刀片

时间:2017-07-20 12:34:16

标签: javascript html laravel

我的刀片文件中有一个模式,当我点击“删除”时会显示该文件。然而它几乎立即消失。没有.js文件被双重加载。

我已经创建了一个小提琴并加载了所有相同的.css和.js文件以及我正在使用的相同HTML并且它工作正常所以我不知道为什么在我的应用程序中它不起作用,任何建议?? < / p>

https://jsfiddle.net/cctqdm75/2/

<!-- Main content -->
        <section class="content">
            <!-- Your Page Content Here -->
            <div class='row'>
    <div class='col-md-12'>
        <!-- Box -->
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">Table of organisations</h3>
                <div class="box-tools pull-right">
                    <button class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
                    <button class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button>
                </div>
            </div>
            <div class="box-body">
                <p>Lists all organisations, with controls to edit, delete etc.</p>
                                <p><a href="2">test inc</a> -- <a href="2/edit"><i class="fa fa-edit"></i>Edit</a> -- <a href="2/delete" data-toggle="modal" data-target="#delModal" name="delete" id="delete"><i class="fa fa-trash"></i>Delete</a></p>

                               </div><!-- /.box-body -->
        </div><!-- /.box -->
    </div><!-- /.col -->
</div><!-- /.row -->

                   <!-- delete Modal -->
    <div class="modal fade" id="delModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title" id="myModalLabel">Delete Organisation</h4>
                </div>
                <div class="modal-body">


                    <div class="form-group">
                        <div class="col-md-12">
                            Deleting an organisation means all records relating to the organisation are purged from the database.<br>
                            There is no way to recover from this! <br>
                            Type DELETE in the box below to delete test inc.<br>                            
                            <input type="text" id="del" class="form-control" name="del" onkeypress="checkdel(this.value)" onkeyup="checkdel(this.value)"/>
                            <input type="hidden" name="_token" value="xyxyxyxyxyxyxyxyxyxy">
                            <input type="hidden" name="ref" value="http://localhost:8000/organisations/manage">

                        </div>
                    </div>

                </div>

                <div class="modal-footer">
                    <input type="btn" class="btn btn-primary" id="btndel" value="Delete" disabled onclick="location.href='/organisations/2/delete'"></input>

                    <input type="btn" class="btn btn-primary" value="Cancel" data-dismiss="modal"></input>
                </div>
            </div>
        </div>
    </div>

        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->

1 个答案:

答案 0 :(得分:0)

如果您想确定在jsfiddle中检查您在外部资源中发布的jQuery和Bootstrap的版本,并在代码中使用jsfiddle中的相同版本。如果修复了你的模态没有消失,你就知道它是Bootstrap的版本,jQuery是不兼容的。

相关问题