使用拖放匹配以下内容 [英] match the following using drag drop

查看:52
本文介绍了使用拖放匹配以下内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的要求是,将有两列,一个州列和一个区列,因此如果v在州上拖放区,则应告诉其是否匹配....无法拖放,但我需要捕获所拖动项目的ID.是否有任何帮助.... ???

Hi ,

my requirement is ,there will be two columns , one states columns and one districts columns, so if v drag and drop districts on states it should tell whether its matched or not .... i m able to drag and drop but i need to capture the id of the dragged item ..can any one help ....???

推荐答案

请在此处找到答案:http://stackoverflow.com/questions/197489/jquery-drag-and- drop-how-to-get-at-element-being-dragged [
Please find the answer here: http://stackoverflow.com/questions/197489/jquery-drag-and-drop-how-to-get-at-element-being-dragged[^].

For your convenience I copied the code for the drop action from the above mentioned site:

.
.
.
drop: function(ev, ui) {
          // to get the id
          // ui.draggable.attr('id') or ui.draggable.get(0).id or ui.draggable[0].id
          // add code here to do something with the information you found out about the dragged object
}
.
.
.




问候,

Manfred




Regards,

Manfred


http://www.elated.com/articles/drag-and-drop-with-jquery-your-essential-guide/ [

这篇关于使用拖放匹配以下内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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