Notification texts go here Contact Us Buy Now!

How to add click vibrating effect in Blogger

Irenic Mind

Hello everyone welcome to Shiva Technic World, You might be like to add a vibrating effect to your website buttons, texts, icons, or any other and you might be finding the code for it, then you are in right place in this article I am going to show you how to add click vibrating effect in Blogger.

If you follow this tutorial carefully you can easily implement the vibrating effect in your Blogger website, So without wasting much time let's check how to add the click vibrating effect in Blogger!

How to add a vibrating effect in Blogger

  • 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[*//* Click Vibrating effect (STW) */ for(var getarr,getar=document.querySelectorAll(".vibrate"),i=0;i<getar.length;i++)getar[i].addEventListener("click",function(){navigator.vibrate(40)});/*]]>*/</script>
  • Then Save HTML
  • How to use it?

    You just need to add class='vibrate' on that code in which you want to add a vibrating effect, I will show an example with button HTML code!

    <button>Hello World!</button>
    <button class='vibrate'>Hello World!</button>

    For multiple class situation

    The situation that already exit a class!

    <button class='otherclass'>Hello World!</button>
    <button class='otherclass vibrate'>Hello World!</button>

    Want to see how it looks?

    Demo

    Conclusion

    Hope this How to add click vibrating effect in Blogger tutorial will useful to you, If you have any doubts related to this tutorial ask me in comment, Do share with your friends, Thanks for visiting, Have a nice day!

    إرسال تعليق

    Cookie Consent
    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
    Oops!
    It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
    AdBlock Detected!
    We have detected that you are using adblocking plugin in your browser.
    The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
    Site is Blocked
    Sorry! This site is not available in your country.
    Cookie Consent

    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.