jQuery UI Draggable: Update containment on drag event
问题 Is this possible: Create a draggable element so that when it is dragged over a specific droppable element, the draggable element's containment option is set to the droppable element? This would create an effect where dragging something over a droppable element causes the draggable element to get locked/stuck to the confines of the droppable element. Below is an excerpt from my code, although it fails to accomplish the above effect. var droppable_position = $('#droppable').position(); $('