Drag & Drop on IPad Web App - while remaining Scroll functionality

前端 未结 2 542
孤城傲影
孤城傲影 2021-02-09 06:34

I am using Jquery UI Drag and Drop ( http://jqueryui.com/demos/draggable ) together with https://github.com/furf/jquery-ui-touch-punch to map touch events over to mouse events.

2条回答
  •  时光取名叫无心
    2021-02-09 06:53

    It depends on your design of course, but you could try using handles.

    Here is jQuery UI's documentation example :

    drag with handle

    drag from content

    not drag with handle

    $("#draggable").draggable({handle:"p"}); $("#draggable2").draggable({cancel:"p.ui-widget-header"});

    Or at least the option cancel could give you a start.

    http://jsfiddle.net/Dn9DX/

提交回复
热议问题