Reputation: 2318
I used mousedown event as hope that it will work when a user touches the element but it didn't seem to show the effect on andriod tablet. How do I fix this?
Upvotes: 0
Views: 1638
Reputation: 339
You can try, onclick mouse handler. On a touch, Android first fires all touch events followed by mouse events to support more devices. Hence, if you want better performance, try "ontouchstart" and "ontouchend" as well.
Upvotes: 1
Reputation: 4330
that's because when you touch your screen you are not firing a onmousedown event. You should try onclick or ondrag or maybe even onmouseover.
Upvotes: 0
Reputation: 64429
By using a different event. I'd guess something like focus
might do for you, but it is hard to say without the goal mentioned.
Upvotes: 0