Simple jQuery Drop Down Menu


/ Published in: jQuery
Save to your folder(s)

A clean and simple drop down menu made in jQuery


Copy this code and paste it in your HTML
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <script src="http://code.jquery.com/jquery-latest.js"></script>
  6. <script>
  7. $(document).ready(function(){
  8. $("#dropdownbutton").click(function () {
  9. $("#menu").slideToggle("slow");
  10. });
  11. });
  12. </script>
  13.  
  14. </head>
  15. <body>
  16. <a href="#" id="dropdownbutton">Show Menu</a>
  17. <ul id="menu" style="display:none">
  18. <li>Item 1</li>
  19. <li>Item 2</li>
  20. <li>Item 3</li>
  21. <li>Item 4</li>
  22. </ul>
  23. </body>
  24. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.