In my current project, I am attempting to place a diamond-shaped item into a droppable area which then generates two sub-droppables for additional items. However, I am facing difficulty implementing the "greedy" function with the newly generated droppables, specifically on the second item - left side when generated. You can view my progress on this jsFiddle.
This is the main dropzone.
$(".objects").droppable({
accept: "#block",
drop: function (ev, ui) {
$(".test").append('Dropped!');
}});
This represents the sub-dropzone. Upon dropping an item here, the text 'Dropped123!' should be displayed in the following code block.
$(".true").droppable({
greedy:true,
accept: "#block",
drop : function (ev, ui) {
$(".test").append('Dropped123!');
}
});