且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Jquery UI - 从显示中获取一个元素:拖动时隐藏元素

更新时间:2023-11-05 18:55:46

在这里找到答案 - > http://docs.jquery.com/UI/Draggable 。 Yeesh ......这是几个小时的挖掘!

Found the answer here -> http://docs.jquery.com/UI/Draggable. Yeesh... that was a few hours of digging!

传递给appendTo选项或由其选择的元素将在拖动过程中用作可拖动帮助器的容器。默认情况下,帮助程序将附加到与draggable相同的容器中。

The element passed to or selected by the appendTo option will be used as the draggable helper's container during dragging. By default, the helper is appended to the same container as the draggable.

$('.selector').draggable({ appendTo: 'body' });

感谢您的帮助!