在 jQuery Draggable 中设置多个容器 [英] Set more than one containment in jQuery Draggable

查看:26
本文介绍了在 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 中设置多个容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆