Open In App

jQuery | slideDown() Method

The slideDown() Method in jQuery is used to check the visibility of selected elements or to show the hidden elements. It works on two types of hidden elements:

Syntax:



$(selector).slideDown( speed, easing, callback )

Parameters: This method accepts three parameters as mentioned above and described below:

Below example illustrates the slideDown() method in jQuery: 



Example: This example display the hidden element by using slideDown() method. 




<!DOCTYPE html>
<html>
 
<head>
    <title>
        jQuery slideDown() Method
    </title>
     
    <script src=
    </script>
     
    <!-- Script to illustrate slideDown() method -->
    <script>
        $(document).ready(function() {
            $(".geek").click(function() {
                $("h1").slideDown();
            });
        });
    </script>
</head>
 
<body>
     
    <!-- hide element using CSS -->
    <h1 style = "display:none" >
        GeeksforGeeks
    </h1>
 
    <button class="geek">
        Click on button to slide down
    </button>
</body>
 
</html>                   

Output: Before clicking on the button:

  

After clicking on the button:

 


Article Tags :