Reputation: 41
So how to limit droppable to contain only full draggable?
Look at this example.. http://jsfiddle.net/jWNkh/1/.. Try to drag the draggable to the droppable and you'll see that the droppable accept even if the draggable is only half in.
How to make it not accept if the draggable is only half in? how to make it accept only if the draggable is fully in the droppable?
you can see in jsfiddle but my JS code is
$('#drag').draggable({ revert: "invalid"});
$('#drop').droppable();
Upvotes: 1
Views: 609
Reputation: 21233
Use tolerance: "fit"
$('#drop').droppable({ tolerance: "fit" });
You can find documentation here
Upvotes: 7