Saturday, 15 May 2010

jquery ui drag and drop - divs not stacking -


I made an example to drug a div in the second and it is inserted into the divide.

  $ (".draggable"). Drug Gables ({Stack: "Dragable"}); $ ("#droppable") .Droppable ({drop: function (ev, ui) {var offset = ui.helper.offset (); ui.helper.appendTo (this) .offset (offset);}});  

This is working fine but when I have to divide, I can stack them first, but when I pull them back again, they will not stack.

Any thoughts I am doing wrong?

You "." In the stack: "Dragable"

Fixed code:

  $ (".draggable") .dragable ({stack: "draggable"}); $ ("#droppable") .Droppable ({drop: function (ev, ui) {var offset = ui.helper.offset (); ui.helper.appendTo (this) .offset (offset);}});  

No comments:

Post a Comment