Make a vibrating effect when there is a click action!
Hello everyone, on this occasion I will share how to create a vibrating effect when there is a click action on our blog, we want it to be a link image button and whatever it is we are free to choose it.
Following The All Step
<script>/*<![CDATA[*//* Vibrate For Click */ for(var getarr,getar=document.querySelectorAll(".vts"),i=0;i<getar.length;i++)getar[i].addEventListener("click",function(){navigator.vibrate(40)});/*]]>*/</script>
How to use it?
Just add thisclass='vts'
on that code in which you want to add a vibrating effect, Its A Example button HTML code!
<button>Hey Its Me!</button>
<button class='vts'>Hey Its Me!</button>