I have draggable by a wide margin and the intersection tolerance. When I drag it into the drop-down box, most of the time it works. However, if I try to drop it at the top of the drop-down box, it will not fall properly, because the margin is calculated as part of the height.
Can anyone suggest a workaround for this? I tried to remove the margin at the beginning of the drag, but this leads to a weird jump of the draggable when you first grab it.
$(".draggable").draggable({
helper: 'clone',
cursor: 'move'
})
$( ".droppable" ).droppable({
tolerance: 'intersect',
drop: function( event, ui ) {
$( this )
.addClass( "ui-state-highlight" )
.find( "p" )
.html( "Dropped!" );
}})
http://jsfiddle.net/wQvWK/6/
source
share