Draggable Clones Jquery?
Posted
by jbatson
on Stack Overflow
See other posts from Stack Overflow
or by jbatson
Published on 2010-06-14T16:55:50Z
Indexed on
2010/06/14
17:02 UTC
Read the original article
Hit count: 300
Any ideas on how to make the clones draggable?
$("#draggable").draggable({
helper: 'clone',
cursor: 'pointer',
});
$("#snaptarget").droppable({
drop: function(event, ui) {
var randomnumber = Math.floor(Math.random()*1000000);
var newId = '#draggable_'+randomnumber;
$(ui.helper).clone(true).removeAttr('id').attr('id',newId).appendTo('#snaptarget');
$(newId).draggable();
}
});
$(newId).draggable(); does not work.
© Stack Overflow or respective owner