Hey there,
I'm making an app, that is using one droppable div
and a few draggable div
s. How can I make the droppable to not accept more than one draggable div
? I Googled, but didn't find any workaround.
Hey there,
I'm making an app, that is using one droppable div
and a few draggable div
s. How can I make the droppable to not accept more than one draggable div
? I Googled, but didn't find any workaround.
You can destroy the .droppable()
widget after the first drop
, like this:
$(".droppable").droppable({
drop: function( event, ui ) {
$(this).droppable("destroy");
}
});
A workaround came up in mi mind. How can i check is there's dropped element in this droppable div? If it's busy then revert this draggable, which is trying to be dropped