http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/ shows how to solve the basic problem of opening the same dialog multiple times.
http://blog.nemikor.com/2009/08/07/creating-dialogs-on-demand/ shows how to create the dialogs on-demand to avoid the overhead of creating them on document ready. On Sep 29, 1:14 pm, Bliztz <[email protected]> wrote: > Hi (and sorry for my english, also i'm not sure if this is the ebst > place for asking this) > > Well actually I can't make this code work properly abd don't know how > to solve it i hope some could lend me a hand. I'll explain my problem: > > - I have a form hidden (display:none) and when I click on a link I > clone it into a div and modify it. is something like this: > > $('#show_form').click(function() { > $('div.activo').html($('#form_switch').clone(true)); > $('div.activo #form_switch legend').html('Switch ' + id); > $('div.activo #form_switch input[name="idswitch"]').attr > ('value',id); > $('div.activo #form_switch #dialog').dialog({ > bgiframe: true, > autoOpen: false, > height: 400, > width: 400, > title: 'Configuración' > }); > return false;}); > > the dialog is created because if a set autoOpen to true the dialog > appears when I click the link > > -Inisde the hidden form I have a link that should open a dialog where > a textarea appears the problem is once the form with the link is > cloned it doesn't open the dialog. I have try this two options: > > $('div.activo #form_switch #edit_form').live('click', function() { > $(this).parents('form').find('#dialog').dialog('open'); > //points to the div #dialog in the same form > return false; > }); > $('#edit_form').click(function() { > $(this).parents('form').find('#dialog').dialog('open'); > //points to the div #dialog in the same form > return false; > }); > > neither of these work (the dialog doesn't open) > > -Note that the form can appears more than once (be cloned multiple > times) > > I don't kown if i've explained myself well it may sound a little > confusing. Hope you could help me. Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
