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

查看:163
本文介绍了在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的containment选项中设置一个以上的类?

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天全站免登陆