Search code examples
drag-and-dropjquery-ui-sortableglow

drag and drop with multiple sortable options in bbc glow


Is it possible to drag and drop the child div inside the parent.Below code it is possible to drag and drop through out the col1,col2,col3. I would like to drag the child divisions with in that column itself. eg: if Column Col1 contain child A,B,C and the divsions inside the A should be sortable through out A.

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

Solution

  • 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    
    
                }
    
        });
    

    The above code working fine. Put the sub div in A and if we give a class it can be drag only with in the div