Skip to content

Instantly share code, notes, and snippets.

@shtefcs
Last active November 8, 2019 04:12
Show Gist options
  • Save shtefcs/f5ac9469f6f00448984db65c2cbdc6a7 to your computer and use it in GitHub Desktop.
Save shtefcs/f5ac9469f6f00448984db65c2cbdc6a7 to your computer and use it in GitHub Desktop.
vibrate on mobile phone button
<script>
document.getElementById('vibrate111222333').addEventListener('click', function (event) {
event.target.innerText = 'Vibrating'
navigator.vibrate(1000);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment