0

How to restrict sortable to be to allow only columns inside a rows and rows inside a container?

Example:

Container is having rows and columns. Both rows and columns are sortable. But how to stop row inserted inside a columns?

Working Link

$(".demo, .demo .column").sortable({
    connectWith: ".column",
    opacity: .35,
    handle: ".drag"
});
B L Praveen
  • 1,812
  • 4
  • 35
  • 60

1 Answers1

0

[Solved]

I splitted the connectWith as below.

$(".demo ").sortable({
    connectWith: ".demo",
    opacity: .35,
    handle: ".drag"
});

$(".demo .column").sortable({
    connectWith: ".column",
    opacity: .35,
    handle: ".drag"
});
B L Praveen
  • 1,812
  • 4
  • 35
  • 60