• Create a toggle effect slide down div with jQuery

    Here, We are going to create a toggle effect slide down div which will open

    a close on the same button within this tutorial.

    Create a html file and add CSS, HTML and JavaScript as following steps.

    Step 1: The CSS

    Step 2: The HTML

    Now we have created the css all we have is the html and jQuery section, in this section we

    will be looking at the html.

    Create A Toggle jQuery Dropdown Div

    Click the little button below!

    X

    Step 3: The jQuery

    This is the last part of the tutorial.

    View Code JAVASCRIPT
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><script type="text/javascript">// <![CDATA[
    $(document).ready(function(e) {
     
        $('#dropdown').on('click',function(){
     
    		$('.dropdownwrap').slideToggle();
     
    	});
     
    });
    // ]]></script>
    Tags:

Comments on this post

Leave a Reply

  • Security Code :


    eight + = 9