D
D
Dmitry Gusev2012-03-06 18:27:22
JavaScript
Dmitry Gusev, 2012-03-06 18:27:22

JS/JQuery onmouseover event on iPad?

Good day!
I ran into a problem:
in desktop browsers, onmouseover calls the function I need, the problem is to implement the same thing for ipad, and android devices.
Thanks in advance!
upd: I use the drag'n'drop mechanism and I need to change their places when dragging one object to another, while on the element on which I move the object, an event should be processed that shows a translucent div on this very element.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Ilya Shabanov, 2012-03-06
@ishaba

onmouseover does not work, but hover somehow works: jsfiddle.net/6QkLq/ - checked on an iPhone

A
Anatoly, 2012-03-06
@taliban

Come up with something else, alas, but in our time, phone screens do not allow you to catch holding your finger over an element without touching the screen.
Alternatively, do the same for a long press.

K
Keyten, 2012-03-06
@Keyten

There seems to be a dragover event, try it. In general, it’s not easier to catch the location of the mouse (finger) and see if it is within the element

X
xmeoff, 2012-03-06
@xmeoff

Use jQuery Mobile

V
Vas3K, 2012-03-07
@Vas3K

ontouchstart, ontouchmove, ontouchend. I would implement through them. I have not heard of a complete replacement, but it is easily written with an ontouchmove handler. Fortunately, you know the coordinates and yourself and the goals.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question