Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.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
使用加载函数加载页面后未打开jquery对话框_Jquery_Jquery Ui - Fatal编程技术网

使用加载函数加载页面后未打开jquery对话框

使用加载函数加载页面后未打开jquery对话框,jquery,jquery-ui,Jquery,Jquery Ui,我正在使用加载功能加载页面对话框未打开,但当我刷新页面时,对话框工作。警报正在使用load()工作。有什么建议吗 jQuery( "#edit-address-map" ).live('click', function(){ alert('in'); jQuery( "#edit-address-map-div" ).dialog({ modal: true, height:370,

我正在使用加载功能加载页面对话框未打开,但当我刷新页面时,对话框工作。警报正在使用load()工作。有什么建议吗

jQuery( "#edit-address-map" ).live('click', function(){
            alert('in');
            jQuery( "#edit-address-map-div" ).dialog({ 
                modal: true,
                height:370,
                width:350,
                resizable: true,
                draggable: false,
                dialogClass: "flora",
                close: function(ev, ui) { jQuery(this).dialog('destroy'); }

             });    

        });

当您单击
编辑地址映射
元素时,看起来您正试图打开
编辑地址映射div
对话框。对吧?

$(function() {

    jQuery( "#edit-address-map" ).live('click', function(){
        alert('in'); 
        $('#edit-address-map-div').dialog("open"); // raise the open event on click
    });

    // wire up the dialog properties when the DOM loads
    jQuery( "#edit-address-map-div" ).dialog({ 
        autoOpen: false, // so it won't open when the page loads
        modal: true,
        height:370,
        width:350,
        resizable: true,
        draggable: false,
        dialogClass: "flora",
        close: function(ev, ui) { jQuery(this).dialog('destroy'); }
    });   
});

此函数是否在函数中?浏览器的javascript控制台中是否有任何错误?此函数在就绪函数中,控制台中没有错误。如果我像下面这样输入,则会出现“this.\u mouseInit not a function”(此函数不是函数),此时肯定有其他东西干扰此操作。因为它在JSFIDLE中对我有效。是的,它在JSFIDLE中工作正常,但问题是我在对话框未打开时使用load()加载了页面。刷新页面时,对话框打开