【问题标题】:drag and drop with multiple sortable options in bbc glow在 BBC Glow 中使用多个可排序选项拖放
【发布时间】:2011-07-31 08:38:22
【问题描述】:

是否可以将子div拖放到父div中。下面的代码可以拖放col1,col2,col3。我想在该列本身中拖动子部门。例如:如果列 Col1 包含子 A、B、C 并且 A 内的 divsions 应该可以通过 A 排序。

 new glow.widgets.Sortable(
    '#cols-example .col1, #cols-example .col2, #cols-example .col3',
    {
            draggableOptions : {
                    handle : 'strong'
            }
    }
);

【问题讨论】:

    标签: drag-and-drop jquery-ui-sortable glow


    【解决方案1】:
    new glow.widgets.Sortable(
    '#cols-example .col1, #cols-example .col2, #cols-example .col3',
    {
            draggableOptions : {
                    handle : 'strong'
            }
    }
    );
    
      new glow.widgets.Sortable(
      '#A .maincat',
       {
           constrainDragTo : '#A',
           axis            : 'y',
           onSort : function () {
    
             // your code here    
    
                }
    
        });
    

    上面的代码工作正常。将子 div 放在 A 中,如果我们给一个类,它只能在 div 中拖动

    【讨论】:

      猜你喜欢
      • 2019-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-18
      • 1970-01-01
      • 1970-01-01
      • 2016-12-03
      • 1970-01-01
      相关资源
      最近更新 更多