Skip to content
Related Articles

Related Articles SlideDown Effect
  • Last Updated : 20 Nov, 2020

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

Syntax :

Effect.SlideDown('id_of_element', { duration: 3.0 });

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


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

Example: To see the effect first install the library and then open this 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.SlideDown(element, { duration: 3.0 });
            function displayImage(element){
            new Effect.Appear(element,{duration:1, from:1.1, to:1.2});
        <div onclick = "displayImage('hideshow')">
            Click the image to SlideDown!
        <div id="hideshow" onclick = "ShowEffect(this);">
           <img src = "GEEKSIMAGES/geeks1.PNG" alt = ""  /><br/>
            Image to Slidedown


My Personal Notes arrow_drop_up
Recommended Articles
Page :