Tuesday, September 18, 2012

JQuery Toggle Example


Toggling using J Query to Show/Hide Div

Steps.-
1. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
    add this line in your code for j Query Library.
2.
<input type="submit" id="xyz" value="Check Toggle" >

        <div id="dv1" style="color:#ff1493;">
         a journey over toggle function in jquery. <br/>
           This is a demo. <br/>
           in this demo dive section is toggle on button click event in different type of animation.
        </div>
        <script src ="jquery.js"></script>

        <script>
            $('#xyz').click( function aditya()
            {
                $('#dv1').slideToggle().delay(1000);
            }
            )

        </script>

see Video






No comments:

Post a Comment