JQuery 在 Table 中提交的 Div 中进行拖放计数验证

JQuery Drag and Drop Count Validation on Submit in Divs in a Table

Link to JS Fiddle

我有一个包含 div 的 table,在这些 div 中我有图像,我想将它们从第一列拖放到接下来的两列中。那一点已经完成,但我想要发生的是当用户单击 'Finish' 时它运行计数验证以确保用户已将所有图像从第一列移到接下来的两列中。

这可以做到吗?

<td><div class="options" id="option1" ondrop="drop(event)" ondragover="allowDrop(event)">

检查拖放的最佳方法之一是为 .options 提供参数,该参数会在 .options 放下时发生变化。在我的实现中,我使用 JQuery.data().options 上提供参数,如您在此处所见:JSFiddle