How can I make a jQuery UI 'draggable()' div draggable for touchscreen?

后端 未结 7 715
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-28 00:31

I have a jQuery UI draggable() that works in Firefox and Chrome. The user interface concept is basically click to create a \"post-it\" type item.

Basica

7条回答
  •  伪装坚强ぢ
    2020-11-28 01:22

    After wasting many hours, I came across this!

    jquery-ui-touch-punch

    It translates tap events as click events. Remember to load the script after jquery.

    I got this working on the iPad and iPhone

    $('#movable').draggable({containment: "parent"});
    

提交回复
热议问题