2011-07-07 66 views
2

我有一個問題,可排序的jQuery UI在iPad/iPhone上無法用於我的記錄列表。我在每條記錄的前面都有[edit]和[delete]鏈接,UI排序的問題是由http://furf.com/exp/touch-punch/sortable.html修復的,這只是包含一個將觸摸事件重新映射到鼠標事件的js文件。現在工作正常,現在的問題是我無法點擊列表中每條記錄前面的[編輯]或[刪除]鏈接。任何人都可以幫忙嗎? JQuery UISortable在Ipad上運行良好,但正常的鏈接上市失敗

var fixHelper = function (e, ui) { 
     ui.children().each(function() { 
      $(this).width($(this).width()); 
     }); 
     return ui; 
    };

$(document).ready(function() {

$(function() { $("#dynamicsortlists tbody").sortable({ opacity: 0.6, helper: fixHelper, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=updateRecordsListings'; $.post("_changesortorder.php", order, function (theResponse) { }); } }); });

When it was not working for iPad, I just include this jquery file jquery.ui.touch-punch.min.js from http://furf.com/exp/touch-punch/sortable.html . And that worked, but now normal links in #dynamicsortlists tbody tr are not working.

Edit : Okay, No one answered, now another issue, may be that is easy. Please look at http://jqueryui.com/demos/sortable/ with the Default Functionality example, now I don't want the whole "li" to be clicked moved up/down, I want a specific icon with in the "li" and only the the "li" can moved up/down holding from that icon. Please help me with this.

+0

有人可以幫助我嗎? – Sohail

+1

你可以發佈任何代碼?也許做一個[小提琴](http://www.jsfiddle.net)? –

+0

您可能會在https://github.com/furf/jquery-ui-touch-punch上提出問題,與插件作者 – didxga

回答

0

I don't know if this is still interesing for you but enabling a handler works just as it does for draggables... same for the axis...

$("#sortbox").sortable({ handle:'.draghandle', axis:'y' });

然而,這又產生了另一個問題。一旦被一個句柄拖動,當你點擊任何地方而不是句柄時,最後一個排序的項目就會移動。

punch-touch是一個非常酷的插件,但它有一些問題,它是非常難過的,沒有太多的迴應或修復。

+0

觸摸衝頭幾天前更新..有不少修復和改進 – pixelass

2

jquery-ui-touch-punch的0.2版本解決了在Github上記錄的所有問題,其中包括一個可排序小部件內部的鏈接。嘗試再次下載並查看它是否解決了您的問題。如果沒有,請提供示例代碼和$/$。ui版本的問題,我會嘗試修復它。

https://github.com/furf/jquery-ui-touch-punch

相關問題