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

时间:2011-08-10 08:26:11

标签: javascript jquery jquery-ui

有人可以告诉我为什么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" );
                }
            }
        });
 }

没有弹出窗口,但是当我尝试简单的模态警报时,它可以正常工作

我在标题中有这个

jquery-ui.min.js

1 个答案:

答案 0 :(得分:0)

我通过包含依赖关系js文件ROFL

解决了我的问题
相关问题