使用 jQuery 将对象拖动到两个元素之间?
我有一个日历格式的网格,由一个无序列表组成,其中每个列表项代表一天,并且它们并排浮动。然后,我的应用程序每天都会发生许多由装饰精美的 DOM 元素表示的事件。垂直轴代表时间,因此将事件进一步向下移动到列表项会将其移至当天晚些时候(类似于 iCal)。我使用 jQuery Draggable 来允许用户在每天内移动事件。
目前,用户只能将事件添加到某一天,然后在该天内移动它。事件不能跨越多天(即过夜),因为它们使用“包含”功能包含在其日期列表项中。
我想知道是否有一个 jQuery 插件或技术可以允许可拖动元素跨越多个列表项,这样当用户将其拖动到当前列表项的底部时,它就会开始出现在列表项的顶部下一个?
I have a grid in a sort of calendar format, consisting of one unordered list where each list item represents a day and they are floated to be side by side. My app then has many events within each day represented by nicely decorated DOM elements. The vertical axis represents time, so moving an event further down the list item moves it to later in the day (similar to iCal). I am using jQuery draggable to allow the user to move the events around within each day.
Currently the user is restricted to adding an event to a day and then moving it within that day. Events cannot span multiple days (i.e. overnight) because they are contained within their day list item, using the 'containment' feature.
I'd like to know if there's a jQuery plugin or technique out there that would allow the draggable element to span multiple list items such that when a user drags it past the bottom of the current list item it starts to appear at the top of the next one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果有人感兴趣,我启动了一个插件来解决这个问题:
http://opensource.rotify.com/wormhole/< /a>
它对我们来说工作得很好,但仍然处于早期阶段。等不及了,你知道:)
In case anyone's interested I started a plugin to solve this problem:
http://opensource.rotify.com/wormhole/
It's working fine for us but is pretty early stage nonetheless. Couldn't wait around y'know :)