Set more than one containment in jQuery Draggable(在 jQuery Draggable 中设置多个容器)
问题描述
我正在创建一个页面上有一些元素的管理应用程序.这些元素可以拖动.但在页面中,您有 2 个可以拖动的单独位置.
I'm creating a management application with some element on the page. Those element can be dragged around. but in the page you have 2 seperate places where it could be dragged.
那么有没有一种方法可以在 jQuery draggeble 的包含选项中设置多个类?
So is there a way you can set more then one class in the containment option of the jQuery draggeble?
谢谢
推荐答案
设置 ui 包含选项如下:
set the ui containment options like following:
containment:'selector_1, selector_2,...'
这篇关于在 jQuery Draggable 中设置多个容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 jQuery Draggable 中设置多个容器


基础教程推荐
- Bokeh Div文本对齐 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01