I'm having an issue here with this part of JQuery code:
$(".roomblock_slots li").droppable({ activeClass: "drop_here", hoverClass: "hover_here", tolerance: "pointer",
drop: function (event, ui) {
var container = $(this);
if (container.contains(container,"div")) {
return false;
}
return true;
} });
I'm trying to drop an element into a li element, and I want to check if it contains a div element. The issue is, the function itself always returns false and never goes into "return false;", even if the li contains a div element, like this:
<li class="ui-droppable">
<div class="ui-draggable">
</li>
How do I fix this issue?