jQuery UI: moving items from one list to another
Posted
by AnC
on Stack Overflow
See other posts from Stack Overflow
or by AnC
Published on 2010-06-16T12:29:17Z
Indexed on
2010/06/16
12:32 UTC
Read the original article
Hit count: 224
While this should be relatively straightforward, I can't figure out how to move (rather than copy) LI
elements between UL
s.
All I want is to drag any item from list foo to list bar (or vice versa) without duplicating the element.
While connectToSortable
does almost exactly what I want (though I'd prefer to avoid sortable
), it clones the element - and manually removing the original element by reacting to the stop
event turns out to be not so easy (e.g. ensuring that a valid drop actually happened).
A simple "hello world" example would help me greatly.
© Stack Overflow or respective owner