How can I get a button to do something when itā€™s HELD, not clicked | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

How can I get a button to do something when itā€™s HELD, not clicked

19th Jan 2019, 5:46 AM
O. White
O. White - avatar
3 Respostas
+ 3
What you can do is you can use an onclick event attribute and an onrelease event attribute. That will work I guess.
19th Jan 2019, 6:49 AM
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬ - avatar
+ 1
The event is mousedown Simple way is onmousedown It doesn't work on app, you'll need to add ontouchdown too
19th Jan 2019, 9:48 AM
Gordon
Gordon - avatar
0
thanks
11th Feb 2019, 2:14 AM
O. White
O. White - avatar