Draggable Clones Jquery?
- by jbatson
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.