Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trigger Mouse-Over on iPhone?

This might seem like a really dumb question, but I am writing an application and I have come across where my mouse-over, mouse-click and mouse-hover need different events bound to them. Now on Internet Explorer, Firefox, and Safari. It all works as expected.

However, on my iPhone the actions will not trigger. Now my question is are their any specific ways I can have the Mouse-Over essentially be fired when I hold my finger down and trigger an event?

An example where this doesn't work is right on this website when you hover over a comment it is supposed to display the +1 or flag icon.

I am using jQuery.

like image 871
Andrew Avatar asked Nov 30 '09 23:11

Andrew


People also ask

How can I get mouseover on my iPhone?

The usual method cited for viewing the mouse-over text of an image on an iOS device is to press and hold on the image. This works for most images with mouse-over texts. For example, pressing down on the image in.

Can you turn your iPhone to a mouse?

Like Remote Mouse, Mobile Mouse Remote lets your iPhone act as a multitouch trackpad for your computer as well as be a wireless mouse for it. It also lets you use your iPhone keyboard as your computer's keyboard, with programmable hotkeys for quick actions.

How do you hover over something on an iPad?

Turn on Hover TextGo to Settings > Accessibility > Hover Text. If you've set up Accessibility shortcut, triple-click the Home button or top button (depending on your iPad model).


2 Answers

I think you need to reconsider your design for the iPhone (and any mobile for that matter). iPhone web interfaces shouldn't depend on mouse-overs and hovers, as they just complicate the interface significantly.

I strongly recommend that you design a new interface that is optimized for mobile viewing, that don't require clicking on small tiny arrows just to show more options.

like image 106
notnoop Avatar answered Nov 12 '22 17:11

notnoop


Mobile Safari has no mouse and hover events (at least not in the usual accepted sense), they are explicitly called out in Creating Compatible Web Content Unsupported iPhone OS Technologies:

Mouse-over events The user cannot “mouse-over” a nonclickable element on iPhone OS. The element must be clickable for a mouseover event to occur as described in “One-Finger Events.”

Hover styles Since a mouseover event is sent only before a mousedown event, hover styles are displayed only if the user touches and holds a clickable element with a hover style. Read “Handling Events” for all the events generated by gestures on iPhone OS.

like image 44
Remus Rusanu Avatar answered Nov 12 '22 18:11

Remus Rusanu