In this quick article, you will learn how to apply a slide in a DIV tag using jQuery.

Script is given here for your reference.

   <script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function () {

            var $Varcollege = $(‘#college');

            $('#Title').click(function () {

                $Varcollege.slideToggle('slow');

            });

        });

    </script>

ASPX Code (Body Part): 

<body>

    <div style="width300pxtext-align:justifypadding:1pxborder:1px solid #CCCCCCfont-family:Verdanafont-size:14pxcolor:#808080;">

        <div id="Title" style="background-color:#CCCCCCpadding:5pxcursorhand;">

            <b>About My College</b>

        </div>

        <div id="college" style="padding:5px;">

My College is located near Poonamalle, Chennai. Just, opposite to my College, there is an amusement park named “Queensland”. Nearby there is another amusement park named “EVP Amusement Park”.

        </div>

    </div>

</body>


Hope, this article helps you a lot.

  Modified On Nov-30-2017 01:09:15 AM

Leave Comment