0

我有一个div#test,我用它绑定一个dblclick event to opens a jquery ui dialog,现在我想打开

dialog inside a floating div( 表示一个 div 其位置是绝对的并放置在

屏幕中心)当dblclick event triggers打开div#test类似:

           line #1     $("#test").trigger("dblclick"); => open the dialog 

           line #2     $("floatingdiv").html("I want to open the dialog inside

                        this div after executing the line #1);

帮我?谢谢。

4

1 回答 1

0

先把testdiv 里面floatingdiv

$("#test .ui-dialog-content").bind("dialogopen", function() {  
    // Reposition dialog, 'this' refers to the element the even occurred on.
    $(this).parent('div').css('position', 'relative');
});
于 2012-06-01T12:11:40.213 回答