Jquery Plugin For Drag And Drop On Mobile Phones
You Are Here: Home » Blog » Jquery Plugin For Drag And Drop On Mobile Phones
Monday, 12th July 2010
I have made some reasonable progress with creating a drag-and-drop interface that works both on desktop computers and mobile devices.
For those who are unaware of the problem, most touch-screen phones actually hijack the action of dragging on a web page in order to scroll the page up, down, left and right. This means that your average drag and drop mechanism doesn't work on mobile devices despite their inherent tactile nature.
However, I have managed to create a simple script that works as normal drag and drop on a desktop browser, which also has a fail-safe "tap to lift" and "tap to drop" mechanism that works on mobile devices, such as smart-phones, iPhones, iPads and Android phones. I have rolled the script into a jQuery plugin for ease of use, although you could easily adapt it to suit a non-jQuery environment.
It is still a work in progress, but you can find out more on my jQuery Mobile Drag And Drop page, and view a live demo here.