我正在使用.draggable(jQuery UI的一部分)来允许用户在简单的Web应用程序中来回移动项目.它在所有最新的OSX&桌面浏览器上都能正常运行. Windows(Windows Safari除外,在Windows Safari中,由于某种原因它仅垂直移动项目).
I am using .draggable (part of jQuery UI) to allow users to move items around as part of a simple web app. It works fine on all the latest desktop browsers for OSX & Windows (except Windows Safari, where it only moves the items vertically for some reason).
我遇到的主要问题是它无法在Safari IOS(该应用最初瞄准的地方)上运行.
The major problem Im having is it that it doesn't work on Safari IOS (which is where the app is originally targeted for).
是否存在兼容性原因,因此无法正常工作?
Is there a compatibility reason this isn't working?
还有另一种方法可以达到相同的效果吗?
Is there another way that the same effect could be achieved?
我正在其上运行的测试站点是 www.pudle. co.uk/mov/draggable.html ,我还制作了一个jsfiddle- jsfiddle. net/t9Ecz/.
The test site I'm running it on is www.pudle.co.uk/mov/draggable.html and I've also made a jsfiddle - jsfiddle/t9Ecz/.
任何人都非常感谢,欢呼.
Any helps much appreciated, cheers.
推荐答案基于触摸的设备(如iPhone)缺少我们在台式机浏览器中习惯的所有与鼠标相关的常见事件.它确实包括: moousemove ,鼠标移下,鼠标移出等.
Touch-based devices like iPhone lacks all common mouse related events we are used to in desktop browsers. It does include: mousemove, mousedown, mouseup, among others.
因此,简短的答案是,您需要使用一种解决方案,该解决方案应针对上述鼠标事件"使用相应的触摸事件": touchstart , touchmove ,触摸结束或触摸取消.
So, the short answer is, you will need to use a solution that have in mind "touch events" counterparts for those "mouse events" above: touchstart, touchmove, touchend or touchcancel.
看看这个: github/furf/jquery- ui-touch-punch
您可能也会对 jQuery mobile 感兴趣.
希望这是一个开始,您可以在其中找到满足您需求的合适解决方案.
Hope it´s a start where you can find a proper solution for your requirements.
更多推荐
jQuery UI Draggable在iOS设备上不起作用
发布评论