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 cannot drop inside this dialog. I can
drop everywhere 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-tp26859729s27240p26859729.html
Sent from the jQuery UI 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.


Reply via email to