I am trying to design an application using Phonegap, JQuery UI , JQuery mobile and I want to drag and drop but I don't know why my code doesn't work on mobile. It works fine on browser but when I run it on mobile it's not working.
Here is my code
Html code :
<div class="mathheader" align="center" id="container">
<span id="a1" class="cartridge" ><img src="img/app2.png"/></span>
<span id="a2" class="cartridge"><img src="img/app2.png" /></span>
<span id="a3" class="cartridge"><img src="img/app2.png" /></span>
<span id="a4" class="cartridge" ><img src="img/app2.png" /></span>
<span id="a5" class="cartridge" ><img src="img/app2.png" /></span>
<table width="100%" border="1" cellspacing="0" cellpadding="5">
<tr bgcolor="#F2F2F2">
<td width="50%" align="center" class="x" >
<p><b>coulm1</b></p>
</td>
<td width="50%" align="center" class="x">
<p><b>coulm2</b></p>
</td>
</tr>
<tr>
<td width="50%" align="center" id="Td1" class="y" background="img/1.png">
</td>
<td width="50%" align="center" id="Td2" class="y" background="img/4.png">
</td>
</tr>
</ table>
I need to drop those in this table :
now I use darg and drop by class here is javascript code : I use jquery ui
$(function () {
$(".cartridge").draggable({
cursor: 'move',
helper: 'clone',
revert: 'invalid',
});
$(".y").droppable({
accept: '.cartridge',
drop: function (event, ui) {
$(ui.draggable).appendTo(this);
checkwinner();
}
});
});
It works on browser but on mobile. Thanks