jquery clone cannot create duplicate element -


i using shapeshift plugin in order create user interface allows images dropped container another. child container allows images dropped parent container. when images being dragged parent container child container want create duplicate (dragclone set true) in parent container because not want lose information on container. way can drag same image parent container child container multiple times , generate copies.

however, issue these images have hover listener attached them. not want lose hover listener when shapeshift clone created. therefore, analyzed shapeshift code , found this:

if (drag_clone) {     $clone = $selected.clone(false, false).insertbefore($selected).addclass(clone_class); } 

and changed following:

if (drag_clone) {     //changed clone type add data , events     $clone = $selected.clone(true, false).insertbefore($selected).addclass(clone_class); } 

this works fine, clone created , hover listener works both on clone (which kept on parent container) , original element (which moved child container).

however, issue finding now, unable generate new clone. after image dragged first time, if try drag same image again parent child container, dragged image (which dragged child container) disappears.

is issue jquery's clone functionality? thanks!

edit guess know issue might be. when dragging child container, moving original element. causes, when cloned element selected once again, original element replaced it. have added delete funcitonality , when deleting child container not able drag same element @ all. guess matter of dragging clone instead of original element...


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -