jQuery Dialogs wont stay in container div when opened -


i'm working code open multiple dialogs in cascading fashion in desktop type environment. issue keeping dialogs opening outside container "#desktop" div. have tried containment option, using positioning option at: , within: no luck. can set draggable option div #desktop , stays in div correctly. have fiddle setup testing here. here code far:

var dialogoffset = {     top: 10,     left: 200 }; $('button').click(function () {     var parent = $('#desktop');     var parentpos = parent.offset();     var parentindex = $('#desktop').index(parent);     var numdialogs = $('.dlg' + parentindex).length;     var dialogtop = parentpos.top + dialogoffset.top + numdialogs * 30;     var dialogposition = [parentpos.left + dialogoffset.left + numdialogs * 30, dialogtop];      $('<div class="dlg' + parentindex + '"></div>').dialog({         position: dialogposition,         width: 250,         close: function () {             $(this).dialog('destroy').remove();         }     }); }); 

any awesome. thanks.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -