Notifications
All Notifications

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

  • First, go to your Blogger dashboard
  • Then click on the Theme option
  • Then click on the drop-down icon near Customize option
  • Then click on the Edit HTML option
  • Then find </body> and paste the following JS just above it
  • <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>
  • Then Save HTML
  • 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>
    Blogger HTML JS
    SAMIR
    SAMIR
    Hey ! My name is Samir, a professional Web Designer, Graphic Designer, UI / UX Designer as well as Content Creator from Feni,Dagonbhuiyan,Bangladesh. I love to Code and create interesting things while playing with it.

    Facebook ID Telegram ID
    Join the conversation
    Post a Comment