簡體   English   中英

為什么 jquery 不確認模態在我的應用程序上工作?

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

有人可以告訴我為什么 jquery 確認模式在我的應用程序上不起作用? 這是我的代碼

        <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>

這是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" );
                }
            }
        });
 }

沒有彈出窗口,但是當我嘗試簡單的模式警報時,它可以工作

我的 header 里有這個

jquery-ui.min.js

我通過包含依賴 js 文件 ROFL 解決了我的問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM