我有这个标记
<ul id="hello" class="cat">
<ul id="a1" class="cat">
</ul>
<ul id="a2" class="cat">
</ul>
</ul>
我做了这件事
$("ul.cat").droppable(
{
drop:function()
{
alert($(this).attr("id"));
}
});
它总是写“你好”。 只有“你好”。 我怎样才能将 droppable 也绑定(bind)到 child 身上?
UPD:我想在#hello 的 child 和#hello 本身中添加元素。我想确定 li 被丢弃的位置。
最佳答案
我找到了解决方案:#hello 需要 greedy:true
关于jquery - 可转换的 可转换的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5504888/