Skip to content

Instantly share code, notes, and snippets.

@seanmcn
Last active March 11, 2016 07:41
Show Gist options
  • Save seanmcn/3638884 to your computer and use it in GitHub Desktop.
Save seanmcn/3638884 to your computer and use it in GitHub Desktop.
jQuery Droppable (Accept only one Draggable)
$(".drop_area").droppable({
tolerance: "intersect",
accept: ".drop_item",
greedy: true,
drop : function(event, ui) {
$(this).droppable( "option", "disabled", true );
},
out : function(event, ui) {
$(this).droppable( "option", "disabled", false );
},
revert: function (event, ui) {
$(this).droppable( "option", "disabled", true );
}
});
@danivegamx
Copy link

How do you append the draggable object to the droppable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment