i'm having the same sort of problem. my guess though is once you start the drag, your droppable already has to be created. i think there's a specific "workflow" as to how dragging events are handled, and i think there already has to be a droppable created before you can start dragging?
On Dec 19, 6:45 pm, paravamu <aravamudh...@hhbrown.com> wrote: > Hi, I am trying hard to make this work! I have a list of images inside a div > which i make draggable. I also have a dialog which is triggered (open) when > dragging starts. For some reason I cannotdropinside this dialog. I > candropeverywhere else on the page except inside a dialog. here is my code: > > $(document).ready(function(){ > // Executed once all the page elements are loaded > //setup new person dialog > // Change overlay color and opacity > $('#sample').dialog({ > //dialog options > autoOpen: false, > draggable: false, > modal: false, > show: 'explode', > closeOnEscape: true, > position: 'top', > minHeight: '400', > minWidth: '600', > width: 750, > title: "Some title", > open: function(type, data) { > $(this).parent().appendTo("form"); > } > }); > $(".random-img").draggable( > { > cursor: "move", > helper: "clone", > opacity: "0.5", > zIndex: "2700", > containment: "document", > handle: ".random-img", // makes toolbar the dragable part > drag: function(ev, ui) { > $('#sample').dialog("open"); > } > } > ); > $("#sample").droppable( > { > accept: ".random-img", > tolerance: "touch", > drop: function(ev, ui) > { > var droppedItem = ui.draggable.clone().addClass('sclass'); > > $(this).append(droppedItem); > } > } > ); > }); > > </script> > <html> > <head> Page test </head> > <body> > <div class="random-img"> > images/someimage.jpg > </div> > <div id='sample'> > </div> > </body> > </html> > > Any help or insight will be greatly appreciated. > > Thanks > > -- > View this message in > context:http://old.nabble.com/drag-and-drop-into-a-dialog-tp26859729s27240p26... > Sent from thejQueryUI Discussion mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery...@googlegroups.com. To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.