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.
看这个可排序的演示。当你拖动元素时,jQuery 会实时修改列表的 DOM,以便你可以得到拖放效果的反馈。有没有办法关闭这种行为?或者至少为此付出我自己的行为?
编辑:我想保留所有其他 DOM 操作。我只想删除占位符元素的动态移动。
谢谢!
除非到目前为止有更好的解决方案,否则我有一个解决方法。添加:
placeholder: 'placeholder'作为设置,然后在 CSS 中添加:
placeholder: 'placeholder'
.placeholder { display: none }
这至少使元素成为一种无操作。