简体   繁体   English

为什么 jquery 不确认模态在我的应用程序上工作?

[英]why doesn't jquery confirm modal work on my app?

can someone please tell me why is the jquery confirm modal doesn't work on my app?有人可以告诉我为什么 jquery 确认模式在我的应用程序上不起作用? here's my code这是我的代码

        <div id="dialog-confirm" title="Empty the recycle bin?">
            <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>These items will be permanently deleted and cannot be recovered. Are you sure?</p>
        </div>

here's the js code这是js代码

 if(userid == ""){
        $( "#dialog:ui-dialog" ).dialog( "destroy" );

        $( "#dialog-confirm" ).dialog({
            resizable: false,
            height:140,
            modal: true,
            buttons: {
                "Delete all items": function() {
                    $( this ).dialog( "close" );
                },
                Cancel: function() {
                    $( this ).dialog( "close" );
                }
            }
        });
 }

there's no pop-up that come out, but when i tried the simple modal alert, it works没有弹出窗口,但是当我尝试简单的模式警报时,它可以工作

i have this in my header我的 header 里有这个

jquery-ui.min.js

I solved my problem by including the dependency js files ROFL我通过包含依赖 js 文件 ROFL 解决了我的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM