How to drag image clone after drop.?
My image is drag after rotate but I can't drag image first time when it drops.this is a code for image drag and drop."dhtmlgoodies_xpPane li .rotatable" I can drag this image clone and drop on "working-area". I can't drag image clone first time after drop. but the clone is draggable after rotate and resize. this is my problem....
$(document).ready(function(){
$('#dhtmlgoodies_xpPane li .rotatable').draggable({appendTo: "working-area", helper: "clone" });
$('#working-area .rotatable').live('click', function(eve开发者_开发知识库nt) {
test = test + 90;
$(this).rotate({ angle: test , appendTo: "#working-area"}).draggable();
});
$('#working-area .rotatable').live('mousemove', function(event) {
$(this).resizable({appendTo: "#working-area"}).parent().draggable();});
$( "#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());}
}).mousemove(function(e){
var x = e.pageX - this.offsetLeft;
var y = e.pageY - this.offsetTop;
$('#status2').html("X = "+ x +', '+"Y = "+ y);
});
});
Please give me a solution. and refer some code.... I'm using jquery. and language is PHP. * this line responsible for drag after drop. but when resizing and rotate function is added it will not work.
drop: function( event, ui ) { $(this).append($(ui.helper).clone().draggable());} })
精彩评论