0

I am loading a page using load function the dialog is not open but when i refresh a page the dialog is worked. The alert is working using load(). Any suggestions?

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'); }

             });    

        });
4

1 回答 1

0

edit-address-map-div当您单击edit-address-map元素时,您似乎正在尝试打开对话框。正确的?

$(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'); }
    });   
});
于 2012-07-12T14:18:37.700 回答