pab
pab

Reputation: 983

jQuery UI Sortable and Dragable NOT working on iPad, iPhone or Android

Browsers It works no problems, however when I test it on hand held devices such as iPad, iPod, iPhone and Android it doesn't work. I cannot drag the boxes or sort the order at all.

Does anyone know how I can get this working across all platforms?

I have a demo: - http://jsfiddle.net/uJcB7/184/

Hope you guys can help, cheers

Upvotes: 3

Views: 4217

Answers (2)

Gady
Gady

Reputation: 4995

Touch Punch will also fix this, and most other jQuery UI on touch device problems.

Upvotes: 7

slowe
slowe

Reputation: 336

The problem is that jQuery Sortable has attached the dragging to mouse events which may not get fired on touch devices. As a work-around you could use (or adapt) the code at http://code.google.com/p/rsslounge/source/browse/trunk/public/javascript/addtouch.js?r=115 Basically, it maps touch events such as touchstart, touchmove and touchend to mousedown, mousemove and mouseup. Here's a quick update to your jsfiddle that uses it http://jsfiddle.net/uJcB7/218/

Upvotes: 3

Related Questions