0

I am using jquery-ui dialog , now when i minimize the dialogs the dialog gets minimized into the container which is at the left. My problem is when i close the dialog , i also want to close it from the minimized container too.

My dialog's have id of dialog_1,dialog_2,dialog_3... and the minimized dialogs will have id of 1_minimized,2_minimized...

i tried this to the close click function,

$('.ui-dialog-titlebar-close').click(function(){
$( '#' + dialog_id + '_minimized').hide();
});

For the close and restore button

$('#dialog_window_minimized_container').append(
            '<div class="dialog_window_minimized ui-widget ui-resizable ui-state-    default ui-corner-all" id="' + 
            dialog_id + '_minimized">' + this.uiDialogTitlebar.find('.ui-dialog-title').text() + '<span class="ui-min-icon ui-icon ui-icon-newwin"/>  <span class="ui-minimized-close ui-icon ui-icon-close"/></div>');

But it closes all the below child dialogs too. For example if i have 10 dialogs and if i click the close of the 5th dialog, all the below 6,7,8..10 also closes.

How can i actually restrict it to close only the corresponding minimized dialog??

Cheers

4

1 回答 1

0

你可以试试吗$('#'+dialog_id+'_minimized').hide();

因为如果你给空间,它会像对待$('# 1 _minimized').

但是你的选择器是$('#1_minimized')

于 2013-05-15T09:44:07.083 回答