simpl.info navigator.vibrate()

If navigator.vibrate() is supported, your device should vibrate!

View source on GitHub