I am using jquery ui droppable widget. I have the following structure :
Example Fiddle
parent
-
I guess the better way is to use greedy option of droppable. Don't forget to go through the API if you find any problem. http://api.jqueryui.com/droppable/#option-greedy
Here is how your code looks like with greedy option
$(".child").droppable({
accept: '.item',
greedy: true,
drop: function(e, ui){
alert("drop on child");
}
});
There you go... !!!
讨论(0)