0

jQuery 1.3 jQuery UI 1.7.2

我有一个应用程序,其中有许多可放置的 div,它们只接受一个可拖动的。为此,我将所有可放置对象上的接受选项设置为检查有效可拖动对象以及它是否已被占用的函数。如果被占用,accept函数返回false,否则返回true。因此,如果用户尝试将可拖动对象拖放到已被占用的可放置对象上,则可拖动对象将恢复。

我想做的是在用户将可拖动对象放在占用的可放置对象上时提供额外的反馈。知道我该怎么做吗?

4

1 回答 1

0

Why not do this with a class? Set the parent item with the class 'full' when you drop the dragged element. Then you could do something like:

if($this).hasClass('full'))
    //Alert user it is full
于 2010-04-09T21:33:08.793 回答