O'Reilly logo

Web Development Recipes, 2nd Edition by Chris Johnson, Mike Weber, Chris Warren, Brian P. Hogan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recipe 25Mobile Drag and Drop

Problem

We have a pop-up window on our website that we use to display product details. This pop-up is draggable so users can move the detail window to the side of the screen, allowing them to browse the site while the pop-up is visible. Unfortunately, we’ve received some feedback from users with iPads that they can’t move the pop-up windows.

Drag-and-drop functionality has been an easy feature to add to websites for a while now. Various plug-ins are available that can add it with little effort, and it’s not even that difficult to write from scratch. The problem with these plug-ins is that most of them don’t work on mobile devices, because they respond only to events triggered by the user’s mouse. We need to make ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required