If the mouse is inside an element, use it's number of parents to determine it's depth, so that more deeply nested elements will become activated first.
$.drop({
tolerance: function( event, proxy, target ){
// use the cursor and dom depth to determine tolerance
return this.contains( target, [ event.pageX, event.pageY ] )
? $( target.elem ).parents().length : 0;
}
});
Or control the outcome based on a specific selector.
$.drop({
tolerance: function( event, proxy, target ){
// use a selector to determine tolerance
return this.contains( target, [ event.pageX, event.pageY ] )
? $( target.elem ).is('.trash') ? 2 : 1 : 0;
}
});
Good Luck.