Reputation: 2356
I have working in jquery sortable, all are working fine. but empty div will not accept the draggable content.
Here My jquery,
$( ".dropfalse" ).sortable({
connectWith: ".dropfalse",
revert: true,
tolerance: 'pointer',
placeholder: "ui-state-highlight",
cursor: 'pointer',
dropOnEmpty: true,
forcePlaceholderSize: true
});
$('#sortable').disableSelection();
Any suggestion.
Upvotes: 3
Views: 1017
Reputation: 535
Are you sure, the target div does not have zero dimensions, probably height.
Upvotes: 7
Reputation: 13570
I had the same problem with a div that, when empty, wouldn't receive any droppable item. I fixed this just by defining a min-height and min-width for the sortable div, so even when the div is empty, you are going to have the it with same area where you can put the draggable or sortable. Without the minimun dimensions you wouldn't be able to reach the div.
Upvotes: 2