0

How to vibrate when touching the screen on js?

9th Apr 2021, 12:46 AM
Novruz Bazarov
Novruz Bazarov - avatar
5 Respostas
9th Apr 2021, 7:49 AM
Nor'wester 🌪️ 🇧🇩 (INACTIVE)
Nor'wester 🌪️ 🇧🇩 (INACTIVE) - avatar
+ 3
ontouchstart=()=>{navigator.vibrate(1000)}
9th Apr 2021, 2:06 AM
SAN
SAN - avatar
+ 2
vibrate only could works on roughly phone/tablet devices... if supported, this could be achieved with navigator.vibrate() function, by providind accurate argument: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate
9th Apr 2021, 12:55 AM
visph
visph - avatar
0
seriously? best answer mark first set to my answer, then set to ŚĄŃ [Exams] answer wich only provide example of example of how to apply what I provided the how to, after I provided how to use what I give you the way to do iit? that's not fair... all the more when it doesn't explain how this works, and he had upvoted my answer ^^ that's not the way to convince me to try to help you and others to learn ;P
9th Apr 2021, 4:18 AM
visph
visph - avatar