Tutorial by Examples

Check if browser supports vibrations if ('vibrate' in window.navigator) // browser has support for vibrations else // no support
Vibrate the device for 100ms: window.navigator.vibrate(100); or window.navigator.vibrate([100]);
An array of values describes periods of time in which the device is vibrating and not vibrating. window.navigator.vibrate([200, 100, 200]);

Page 1 of 1