Reputation: 360
I am new to jquery. I find a code to drag a image clone and drop on a area. but when I'm dragging that image it directly append on drop region. it was not show during dragging.
$(document).ready(function(){
$('#dhtmlgoodies_xpPane li .rotatable').draggable({appendTo: "working-area", helper: "clone" });
$( "#working-area" ).droppable({ activeClass: "ui-state-default",
hoverClass: "ui-state-hover",
accept: "#dhtmlgoodies_xpPane li .rotatable",
drop: function( event, ui )
{
$(this).append($(ui.helper).clone().draggable());
}
});
});
});
please anyone help to find solution.
Upvotes: 2
Views: 858
Reputation: 8900
I think the issue was the appendTo
of the draggable
. When I removed this it works as expected:
Upvotes: 1