This will move every instance of class "foo" inside the element ID
"target".

$("#target).append($('.foo'));

The reason is that "target" is a single element. If the target is more
than one element, copy is invoked. Whether its event handlers are
copied is unclear (try it). This is problematic. If your target set
drops to one item the entire behavior changes: it moves the original.
Why not just have a move function? That they called the insert
functions "append" and the append functions "insert" is something we
have to live with but they could definitely add additional functions
like "move".

Another possible solution is to simply document this very important
behavior. The documentation is generally sloppy but this is a
particularly bad case. They should unlock the documentation and allow
competent technical writers to update it.

Reply via email to