2016-01-21 45 views
1

我使用HTML5可排序的jQuery插件(http://farhadi.ir/projects/html5sortable/),它適用於我的電腦(谷歌瀏覽器等)。我用鼠標,並沒有任何問題。但它不工作在iPad上。在觸摸設備不感應可拖動的項目。如果你能幫助我,我會很開心。HTML5可排序的jQuery插件不能在ipad上工作

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> 
<script type="text/javascript" src="jquery.shuffle.js"></script> 
<script language="javascript1.5"> 
    function kontrolet() 
    { 
     var id; 
     var say=0; 
     for(a=0;a<dizi.length;a++) 
     { 
      id = $('ul.sortable li:nth-child('+(a+1)+')').attr("id"); 
      if(a!=id) say++; 
     } 
     if(say==0) alert("İt's true"); 
     else 
     alert("Ther are "+ say +" wrong!!!"); 
    }   

var dizi=new Array(1,4,5,8,10,13,14,15); 

$(document).ready(function(){ 
for(a=0;a<dizi.length;a++) 
$('ul').append('<li id='+a+'><img src="'+dizi[a]+'.jpg" width="100%"/></li>'); 
}); 
</script> 
    <ul class="sortable grid" style="margin-left:3%;"></ul> 
+0

我不認爲你可以在iPad上「拖」。 ':P' –

+0

如果你可以使用鼠標指針它的工作。但觸摸屏不會使拖動過程 – user2246457

+0

是...這就是我的意思... –

回答

0

下載/鏈接touch-punch.js用於Ipad設備中的可拖動功能。

http://touchpunch.furf.com/

+0

感謝您的幫助。 İf我可以這個「.js」我必須改變所有的代碼,我必須做出排序。這個代碼塊不能在ipad上製作嗎? – user2246457

+0

您不必更改任何代碼,它只是使用您當前使用的相同的可排序()/可拖動的方法。 –