ItzMe_Ezhil
ItzMe_Ezhil

Reputation: 1406

Jquery UI -sortable between one DIV to another Div, without sortable in within the DIV

Ref image

I have 'N' number of start row (red border) I want sortable(number box 1, 2, 3 etc..) form start row(red border) to receive row(green border).

sortable should not work within start row (red border). And sortable within the receive row (green border) must work.

Here i want to only disable/ cancel sortable function within the start row(red border).

i have used below script code.

     $('.draggable-row').sortable({
      connectWith:".sortable-row"

      });

     $('.sortable-row').sortable({
      connectWith:".sortable-row"
      });

Demo Link

Upvotes: 0

Views: 1718

Answers (1)

Evan Davis
Evan Davis

Reputation: 36592

Only the sortable row should be .sortable; the others should be .draggable.

$('.draggable-row span').draggable({
    connectToSortable:".sortable-row",
    revert: 'invalid'                  
});

$('.sortable-row').sortable({
    revert: true           
});

http://jsfiddle.net/2tn0903g/4/

Upvotes: 2

Related Questions