bon.julia
bon.julia

Reputation: 1

Can I make onclick fire after mousedown, but before mouseup event?

I need audio to play after touchstart and just before a touchend (by holding a button with a finger ). It works by Android, but iOS needs onclick event to start on playing. Is there any way to change an order of this events?

Thanks

Upvotes: 0

Views: 1072

Answers (1)

Dennis
Dennis

Reputation: 4017

No.

You must utilise the onmousedown and onmouseup events.

<p onmousedown="myFunction()">Click the text!</p>
<p onmouseup="mouseUp()">Click the text!</p>

Upvotes: 1

Related Questions