How to vibrate when touching the screen on js? | Sololearn: Learn to code for FREE!


How to vibrate when touching the screen on js?

4/9/2021 12:46:52 AM

Novruz Bazarov

5 Answers

New Answer





Adding to ŚĄŃ [Exams], you may need to check for support on some devices. Most ios don't support the navigator's object. if(windows.navigator && windows.navigator.vibrate) { // insert san's code here } ; Wondering why there's a -1 on san's CORRECT answer tho


vibrate only could works on roughly phone/tablet devices... if supported, this could be achieved with navigator.vibrate() function, by providind accurate argument:


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