Take this for example.
I want to freeze the element from being dragged to the left if left position is less than 80. However, if I return false, then user cannot drag the element at all (even to the right).
handle.draggable('disable'); is completely ignored until the stop event is triggered.
return or return true doesn’t stop the dragging.
Note that I am aware about the containment option, however, my condition is dynamic and containment doesn’t take function as an argument.
You could overwrite the position of the element being dragged.
This fiddle is an example of the position overriding : http://jsfiddle.net/QvRjL/74/
This fiddle is an example of how you could do to check if the dragged element is near a border of your container : http://jsfiddle.net/pPn3v/22/