Best
Best

Reputation: 2318

mousedown JQuery doesn't work on Android touchpad

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

Answers (4)

Varun Goel
Varun Goel

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

STT LCU
STT LCU

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

Lucifer
Lucifer

Reputation: 29670

I think using OnClick event your problem will get solve.

Upvotes: 0

Nanne
Nanne

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

Related Questions