Change the tolerance to a more suitable value. The default value is intersection.
- fit: draggable completely overlaps droppable
- intersect: draggable overlaps the discarded at least 50%
- pointer: mouse cursor overlaps droppable
- touch: draggable overlaps the discarded amount
"touch" seems to work. You can try others.
$(function () {
$('#trash_bin').droppable({
tolerance: 'touch',
drop : function() {
alert('delete!')
}
});
$('#trash').sortable()
});
source
share