Skip to content Skip to sidebar Skip to footer

MouseOver On Touch Screen

I want to make mouseOver or hover like command in Javascript. I want when you hold your finger on an element that element changes attribute(get darker) and when you drag your finge

Solution 1:

Check out this https://developer.mozilla.org/en/DOM/Touch_events as you can tell touch events are still in development. But the latest browsers have started implementing them.


Solution 2:

If you can't find a CSS only solution, you can capture the touchstart, touchmove and touchend events on your document and processing the touchemove (on each firing) by checking the x,y against the ones you want to highlight and add/remove the highlight class appropriately.


Solution 3:

use vMouseEvents from JQuery. That's the working thing.


Solution 4:

Virtual mouse event by JQuery mobile is quite welldone.

https://api.jquerymobile.com/vmouseover/


Post a Comment for "MouseOver On Touch Screen"