Is it possible to launch an onmouseover event on an iPhone?

On iPhone 3G, you can run onmouseover safari event

+4
source share
3 answers

Yes and no, the behavior is not the same as on the computer, see this list for mouse over the iphone.

+3
source

This works in WebKit. If iPhone Safari supports this event internally, it might work.

// Assuming the element you want to simulate a mouseover event with is "theElement" var mouseoverEvent = document.createEvent('MouseEvents'); mouseoverEvent.initMouseEvent('mouseover'); theElement.dispatchEvent(mouseoverEvent); 
+1
source

Unfortunately, this is one of the events that the iPhone does not support :(

Sources: http://www.evotech.net/blog/2007/07/web-development-for-the-iphone/

0
source

Source: https://habr.com/ru/post/1300514/


All Articles