Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use drag and drop of html5 on mobile devices with phonegap?

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?

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> 

and the function of javascript

function dragUser(user, event) { 
     event.dataTransfer.setData('User', user.id); 
 } 

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.

like image 879
Francisco Avatar asked Oct 02 '22 21:10

Francisco


1 Answers

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/
like image 184
Tony Jose Avatar answered Oct 05 '22 23:10

Tony Jose