Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个按钮. on,单击它会将一个类附加draggable到容器中。具有类的 divdraggable被分配jquery draggable()以使其成为draggable。
. on
draggable
jquery draggable()
但是,在运行时创建的对象不会变成dragable.
dragable
要分配给动态元素,请在创建并将它们附加到draggable之后尝试以下语句:draggabledocument
document
$('.class_to_dynamic_element').draggable('destroy').draggable();