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) {
});
}
});
});
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.
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.