在iPad上拖放 [英] Drag and drop on iPad

查看:120
本文介绍了在iPad上拖放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个以jQuery拖放为特色的网页。它适用于所有桌面浏览器,但不适用于iPad。不知何故,点击+拖动事件被捕获以上下移动页面。

I have a webpage that features jQuery drag and drop. It works on all desktop browsers but not on iPads. Somehow the click + drag event is captured to move the page up and down.

那么,如何拖动 - 并且通常在iPad上完成而不编写iPad应用程序?

So, how is drag-and-drop generally done on iPads without writing iPad apps?

推荐答案

不能使用鼠标事件...您需要更改为触摸事件

You can't use the mouse events ... you need to change to touch events


http://ross.posterous.com/2008/08/19/iphone-touch-events -in-javascript /

一种方法是使用移动框架划分两个代码,如jQTouch,jQMobile等...

One way is to divide both code using a mobile Framework, like jQTouch, jQMobile, etc...

这是简单测试使用jQTouch

Here is a simple test using jQTouch

浏览器 iPad jQuery UI Sortable ong>

using jQuery UI Sortable for both Browser and iPad


http: //jsbin.com/ujeyac/19/

使用 jQuery UI可排序演示代码触摸事件代码,效果很好!

这篇关于在iPad上拖放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆