Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 3 与导航向导一起使用时,引导模式消失_Twitter Bootstrap 3_Bootstrap Modal_Wizard - Fatal编程技术网

Twitter bootstrap 3 与导航向导一起使用时,引导模式消失

Twitter bootstrap 3 与导航向导一起使用时,引导模式消失,twitter-bootstrap-3,bootstrap-modal,wizard,Twitter Bootstrap 3,Bootstrap Modal,Wizard,我对引导模式有问题。我使用Bootstrap3.x作为模态,使用BootstrapWizard作为自定义导航向导。所以这两个库都是必要的。当我点击模态时,它会自动消失。有人能帮我吗?我找到了这个问题的解决办法。我最初的HTML代码如下所示 <button class="btn-default" data-toggle="modal" data-target="#addPostModal" data-backdrop="static" data-keyboard="false">Add

我对引导模式有问题。我使用Bootstrap3.x作为模态,使用BootstrapWizard作为自定义导航向导。所以这两个库都是必要的。当我点击模态时,它会自动消失。有人能帮我吗?

我找到了这个问题的解决办法。我最初的HTML代码如下所示

<button class="btn-default" data-toggle="modal" data-target="#addPostModal" data-backdrop="static" data-keyboard="false">Add Posts</button>
简而言之,我从HTML中删除了切换功能,并添加了切换方法。我们还可以从onclick()函数中删除“toggle”,这没有任何区别

$(document).ready(function()
            {
                $("#myButton").click(function()
                {
                    $("#addPostModal").modal();
                });
            });
$(document).ready(function()
        {
            $("#myButton").click(function()
            {
                $("#addPostModal").modal("toggle");
            });
        });
$(document).ready(function()
            {
                $("#myButton").click(function()
                {
                    $("#addPostModal").modal();
                });
            });