jQueryUI 可拖动的问题
Here is my demo code, I made some covers on a div, and want to drag that div, but it doesn't work.
-0-,sorry all,I resoved it myself.....here is the code lol
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定页面的哪些部分是可拖动的,但在 HTML 中,您创建可拖动的 div 并添加分层在其顶部的所有其他 div。其他 div 不在可拖动 div 内部,因此它们自然会阻止拖动操作(可拖动 div 上没有不会被静态 div 覆盖的表面)。
如果您的意思是与可拖动 div 一起移动的所有内容,则必须将它们放入可拖动 div 内: http://jsfiddle.net/r6PXp/
另一方面,如果您希望底部 div 可拖动,以便您可以将其“滑”离其顶部的静态 div,事情就会得到更复杂。
It's not sure what parts of the page you want to be draggable, but in the HTML you create the draggable div and add all the other divs that are layered on top of it. The other divs are not inside the draggable div so naturally they block the dragging action (there's no surface on the draggable div that wouldn't be covered by a static div).
If you mean all the stuff you have there to move along with the draggable div you have to put them inside the draggable div: http://jsfiddle.net/r6PXp/
On the other hand if you want the bottom div be draggable so that you could "slide" it away from the static divs on top of it things get more complex.