I am digging from past 5-6 hours and really in trouble . I am facing issues with draggable
objects . What I am trying is I have a popup that is containing 18 small draggable divs . I need to drag one by one those draggable items from the popup and drop it to my document body . The popup is not a bootstrap one which actually freezes everything in the document unless you don't close it . So it's a simple popup . What I have tried so far is this :-
$("#divLocatePops").find('.original').draggable({
helper: 'clone'
});
$('#divGeneralLayOutContentBody').droppable({
accept: '.original',
drop: function(event, ui) {
$(this).append($(ui.helper));
}
});
It is creating clone successfully , even I am able to drag the clone object as well . But the moment I drop it to the divGeneralLayOutContentBody
(this is my entire document id) , the clone object appends at the wrong positions . I cannot even see them sometimes but I can do see them in the DOM when I open my debugger tool .
One thing more , I have some applied css to the draggable items . I have set the top
and left
to the draggable items in order to have them properly aligned in the popup . I am not sure whether this is causing issue with the clone as when i create clone then obviously it also has the same css applied . But that too changes when I go on dragging my clonee object .
Any help would be much appreciated .
This is the popup I am talking about . You can see the draggable items 1,2,3,...18