JQuery拖放计数验证在表中的div中提交 [英] JQuery Drag and Drop Count Validation on Submit in Divs in a Table

查看:124
本文介绍了JQuery拖放计数验证在表中的div中提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

链接到JS Fiddle

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

I have a table that has divs, in those divs I have images that I would like to drag and drop from the first column into the next two columns. That bit has been done, but what I would like to happen is when the user clicks 'Finish' it runs a count validation to make sure the user has moved out all the images from the 1st column into the next two columns.

可以这样做吗?

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





推荐答案

检查拖放的最佳方法之一是给参数 .options .options 下降时,它会改变。在我的实现中,我使用 JQuery.data() .options JSFiddle

The one of best way to check on drag and drop is to give parameter to .options which will change when the .options dropped. In my implementation, I use JQuery.data() to give parameter on .options, as you can see on here : JSFiddle

这篇关于JQuery拖放计数验证在表中的div中提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆