Question

Here's what I've done so far: http://www.phillipsenn.com/TPT/WordSearch/VisualCreator.cfm

It's a grid with 1 letter in each cell. The student drags their mouse to highlight a word.

What I want to do is have a UI for the iPhone where a student can drag their finger to complete a word the way it's already working on the desktop version.

If the iPhone is too hard, then maybe I could start by getting it to work on Android first. On my Nexus, dragging my finger down doesn't do anything, and dragging it to the left is scrolling the screen.

Was it helpful?

Solution

Your current javascript listens for mousedown, mouseup events and these events aren't triggered by default on touchscreen devices.

I'd recommend look at adding script to map touch events to the mouse events, so that your script could run on touchscreen or mouse driven devices, such as what is shown here.

jQuery Mobile also adds functionality to treat touch events as mouse events also, see vmousedown documentation for example.

Hope this helps :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top