Hi all,

I found this code : http://www.magic-dev.com/drag-drop-multiple-items.htm

It works perfectly. However, if I pass these elements by ajax to a javaserverpage,they will be displayed, but won't either be dragged or dropped even If I have all the droppable and draggable functions and jquery libraries in the destination page, it still does not work, or move.

I tried to use these lines of code, which improved the mobility, but not even close to what it should behave like:

    $(".itemSort1")
    .draggable({cancel: null})
    .droppable({cancel: null});
    $("#myinput")
        .draggable({cancel: null}) 
        .droppable({cancel: null}); 
    $("#List1")
    .draggable({cancel: null})
    .droppable({cancel: null});
    $("#List2")
    .draggable({cancel: null})
    .droppable({cancel: null});

I would appreciate your help,

Best Regards

You can't pass elements to a page so it's not clear what you mean by "pass these elements by ajax to a javaserverpage".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.