【问题标题】:Draggable div setting options in script脚本中可拖动的 div 设置选项
【发布时间】:2011-08-06 21:45:04
【问题描述】:

什么可能导致没有为元素设置可拖动选项。

我有这些 jquery 设置。

<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
<script src="http://jqueryui.com/jquery-1.5.1.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.core.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.mouse.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.resizable.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.draggable.js"></script>

并尝试在这样的代码中关闭可拖动选项。

     editable.parent().draggable({disable: true});
     editable.parent().draggable("option", "disable", true);

editable.parent() 确实找到了正确的元素,但可拖动选项没有关闭。

感谢您的帮助。

【问题讨论】:

    标签: draggable jquery-ui-draggable


    【解决方案1】:

    1) 确保选择器正常

    2)

    .draggable("disable")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-08-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多