Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article Pulsate Effect

  • Last Updated : 20 Nov, 2020

In this article we will demonstrate the effect of Pulsate by using JavaScript library called having smooth transition from one to another. We can adjust the duration of the effect as well.


Effect.Pulsate('id_of_element', { pulses: 5, duration: 1.5 });

Note: To use this library we are suppose to download or install the library and then use it in our programs. And to do so you can follow the this link


To demonstrate the use of this function we have written a small piece of code. In which we have written a small JavaScript function named ShowEffect() method which uses Pulsate() method of this library. By clicking on Click Image to Pulsate, you will see the effect clearly.

Example: To see the effect first install the library and then open the following program in local environment.


      <script type = "text/javascript" 
      <script type = "text/javascript" 
       src="scriptaculous-js-1.9.0/src/scriptaculous.js?load = effects">
      <script type = "text/javascript">
           function ShowEffect(element){
            new Effect.Pulsate(element, { duration: 3.0 });
        <h2>Pulsate Effect for Image</h2>                 
    <div id="hideshow" onclick = "ShowEffect(this);">
             <img src = "GEEKSIMAGES/geeks1.PNG" alt = "" /><br/>
         Click Image to Pulsate


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!