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.
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/
One way is to divide both code using a mobile Framework, like jQTouch, jQMobile, etc...
Here is a simple test using jQTouch
Just added a simple test of my own
using jQuery UI Sortable for both Browser and iPad
http://jsbin.com/ujeyac/19/
using jQuery UI Sortable demo code and the Touch Events code, works great!
精彩评论