Skip to content

Instantly share code, notes, and snippets.

@cverbiest
Created November 18, 2015 15:21
Show Gist options
  • Save cverbiest/e3a69f7bd5f217cb54ab to your computer and use it in GitHub Desktop.
Save cverbiest/e3a69f7bd5f217cb54ab to your computer and use it in GitHub Desktop.
<html>
<head>
<script>
TestVibrate()
{
navigator.vibrate = navigator.vibrate ||
navigator.webkitVibrate ||
navigator.mozVibrate ||
navigator.msVibrate;
if (navigator.vibrate) {
console.log('we can vibrate');
} else {
console.log('no vibration for you :-(');
}
}
</script>
</head>
<body Onload="TestVibrate()" >
Test
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment