Last active
September 8, 2017 07:18
-
-
Save ahmethakanbesel/815ddc5dd85481545363d9203684ce01 to your computer and use it in GitHub Desktop.
Javascript navigator.vibration API Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button onclick="titret(1000)">Titret</button> | |
<button onclick="titret([1000, 200, 1000, 2000, 400]);">Titret (3 defa aralıklı)</button> | |
<script> | |
function titret(sure) { | |
navigator.vibrate(sure); | |
console.log(sure + "ms"); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment