开发者

JQuery UISortable gets fine on Ipad, but normal links on listing fail now

I had a problem that jQuery UI sortable was not working on iPad/iPhone for my record list. I have [edit] and [delete] links in front of each record, the problem of ui-sortable is fixed by http://furf.com/exp/touch-punch/sortable.html, that was just to include one js file that remap touch events to mouse events.Now that works fine, the new problem now is that I can't click the [edit] or [delete] links in front of each record in the listing. Can any one help please?

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) { }开发者_StackOverflow); } }); });

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.


The 0.2 release of jquery-ui-touch-punch resolved all issues logged against it on Github, including one where links inside of a sortable widget. Try downloading again and see if it fixes your issue. If not, file an issue with sample code and versions of $/$.ui and I will try to fix it.

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


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' });

Yet.. this creates another issue. once dragged by a handle, the last sorted item moves around when you click anywhere but a handle.

punch-touch is a really cool plugin, but it has quite some issues and it is very sad, that there are not many responses or fixes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜