Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Make A Simple DropDown in HTML With The Help of Jquery and CSS

    • 0
    • 3
    • 3
    • 1
    • 0
    • 0
    • 0
    • 0
    • 1.48k
    Comment on it

    You Can Use Below Code to Make A Simple Drop Down In HTML With The Help Of Jquery And CSS

     ***Jquery***
    <script>
    $(function(){
        $('.DropDown > ul > li').on('click', function(){
            $('.DropDown ul ul').slideUp();
            $(this).children('ul').slideDown();
        });
    });
    </script>
    
    ![<html>
           <div class="DropDown">
            <ul>
                <li><a href="javascript:void(0);">ONE</a>
                    <ul class="First">
                        <li><a href="javascript:void(0);">1</a></li>
                        <li><a href="javascript:void(0);">2</a></li>
                    </ul>
                </li>
                <li><a href="javascript:void(0);">TWO</a>
                    <ul class="Second">
                        <li><a href="javascript:void(0);">3</a></li>
                        <li><a href="javascript:void(0);">4</a></li>
                    </ul>
                    <div class="clr"></div>
                </li>
                <li><a href="javascript:void(0);">THREE</a>
                    <ul class="Second">
                        <li><a href="javascript:void(0);">3</a></li>
                        <li><a href="javascript:void(0);">4</a></li>
                    </ul>
                    <div class="clr"></div>
                </li>
            </ul>
        </div>
    
    </html>][1]
    

    [1]: http://Free Web Proxy

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: