Draggable Clones Jquery? -
Any ideas about how to make the clone dragable?
$ ("# draggable"). Draggable ({helper: 'clone', cursor: 'indicator',}); $ ("# Snaptarget") Droppable ({Drop: Function (Event, UI) {var randomnumber = Math.floor (Math.Random (* 1000000); var newId = '#draggable _' + randomnumber; $ (ui.) Clone (true). RemoveAttr ('id'). Attr ('id', newId) .appendTo ('# snaptarget'); $ (newId). Draggable ();}});
$ ( New ID.) Draggable (); is not working.
you It should be: then it: should be: So you end up on: #
You can not start ID with
var newId = '#draggable _' + randomnumber;
var newId = 'draggable _' + randomnumber;
$ (newId). Draggable ();
$ ('#' + new id). Druggate (); Example:
var newId = 'draggable _' + random number; $ (Ui.helper) .clone (true) .removeAttr ('id') attr ('id', newId) .appendTo ('# snaptarget' ). $ ('#' + New ID) Drug Gables ();
Comments
Post a Comment