问题描述
我需要使用phonegap将设备拖放到移动设备上。我试着用jquery mobile和jquery ui + jquery touch punch但html5是更好的我。可能吗?
I need a drag and drop to mobile devices using phonegap. I tried with jquery mobile and jquery ui + jquery touch punch but html5 is better for me. Is it possible?
感谢,
Francisco
Thanks,Francisco
// EDIT
这是一个可拖动的图片:
Here is a draggable image :
<a href="" name="cebra" draggable="true" ondragstart="dragUser(this, event)" >
<img src="Imagenes/cebra.png" alt="cebra" width="150" height="100" id="" style="background-color: #FFFFFF; display: block;" ; />
</a>
和javascript的功能
and the function of javascript
function dragUser(user, event) {
event.dataTransfer.setData('User', user.id);
}
我需要知道如果我可以拖拽图像到android与属性draggable =True和phonegap。
I need to know if I can make a draggable image to android with the property draggable = "True" and phonegap. I can make this with jquery ui + jquery ui touch punch but could be better with html5 for my application.
推荐答案
Hi Fransisco,我可以使用jquery ui + jquery ui touch punch,但可以更好地与html5一起使用。
可以通过使用jQuery UI添加拖放功能,我们已经在web,android和iOS应用程序(使用phonegap也)实现了。
Hi Fransisco, Drag and drop feature can be added by using jQuery UI, and we have implemented this in web, android and iOS applications(Using phonegap also). So go ahead with this and please refer the following links,
- http://jqueryui.com/draggable/
- http://jqueryui.com/droppable/
这篇关于我可以在移动设备上使用phonegap拖放html5吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!