jquery-ui sortable | How to get it work on iPad/touchdevices?

后端 未结 4 1577
遥遥无期
遥遥无期 2020-12-22 17:11

How do I get the jQuery-UI sortable feature working on iPad and other touch devices?

http://jqueryui.com/demos/sortable/

I tried to using event.prevent

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-22 17:34

    To make sortable work on mobile. Im using touch-punch like this:

    $("#target").sortable({
      // option: 'value1',
      // otherOption: 'value2',
    });
    
    $("#target").disableSelection();
    

    Take note of adding disableSelection(); after creating the sortable instance.

提交回复
热议问题