如何更改拖放到可排序列表中的项目的 UI?
我有两个 jQuery UI 可排序列表。当我将拖动的项目放到最终列表中时,我想更改其 UI(从源列表中的一个小部件开始,但当放入目标列表时将其分解为详细视图)。有谁知道我该如何做到这一点或者是否可能?
I have two jQuery UI sortable lists. I'd like to change the UI of the dragged item when I drop it on the final list (start off as a small widget in the source list, but explode it to a detail view when dropped into the destination list). Does anyone have any ideas of how I can do this or if it's even possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
stop
事件:你会有这样的东西:
现场演示: http://jsfiddle.net/ambigously/Cb5BQ/
您希望跟踪类中的当前状态(小或大),以便您可以根据需要在“小部件”版本和“详细视图”版本之间切换。
You could use the
stop
event:You'd have something like this:
Live demo: http://jsfiddle.net/ambiguous/Cb5BQ/
You'd want to keep track of the the current state (small or large) in a class so that you can switch between the "small widget" version and the "detail view" version as appropriate.