【问题标题】:jquery sortable breaks axis rule. How to fix?jquery sortable 打破了轴规则。怎么修?
【发布时间】:2012-07-02 13:17:39
【问题描述】:

当我使用 sortable 时,轴规则变为非活动状态 (jsfiddle example)

我希望项目仅水平移动。有人可以帮忙吗?

【问题讨论】:

    标签: jquery draggable jquery-ui-sortable


    【解决方案1】:

    添加axis: x以限制拖动轴:

        $("#sortable").sortable({
            axis: "x",
            revert: true
        }); 
    

    DEMO

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-15
      • 1970-01-01
      • 2011-03-03
      • 1970-01-01
      • 1970-01-01
      • 2021-02-17
      • 1970-01-01
      相关资源
      最近更新 更多