I'm currently trying to get the jQuery UI sortable function working on my Android phone (touch). Sadly, the touch event don't works on my phone. I've tried everything.

    handle: ".sort-section-handle",
    axis: "y",
    placeholder: "sort-placeholder",
    update: function (e, r) {
        var a = {action: "update_element_position", sec: jQuery(r.item).attr("data-section"), pos: r.item.index()};
        jQuery.post(cm_ajaxurl, a)

jQuery("#details-inner .sort-section-handle").disableSelection();

I've included jQuery UI and also jQuery UI Touch Punch for the mobile touch support within WordPress this way:

wp_enqueue_script( 'jquery-ui-sortable' );
wp_enqueue_script( 'jquery-touch-punch' );

On the computer everything works great but not on my phone. On the phone it's scrolling the page when I'm trying to press the handle to move the section. Any idea what could be the problem? Maybe the handle?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.