HTML Button, onhold not onclick attribute. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

HTML Button, onhold not onclick attribute.

I’m making a mobile game in html, (I’ll add a link to it down below). I have a simple button. But how can I get it do do repeated clicks if you hold the button. What I mean is, on a desktop, if you hold down a key, it runs a function multiple times which is great, but I need to do the same with mobile buttons. onmousedown and up don’t work because it’s for mobile, I’m really stuck at this point in time, please help guys! Thanks, O white https://code.sololearn.com/W3nh09o99GQE/?ref=app

7th Jan 2020, 2:32 AM
O. White
O. White - avatar
1 Answer
0
ontouchmove
7th Jan 2020, 6:02 AM
Gordon
Gordon - avatar