/ Published in: jQuery
A clean and simple drop down menu made in jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){ $("#dropdownbutton").click(function () { $("#menu").slideToggle("slow"); }); }); </script> </head> <body> <a href="#" id="dropdownbutton">Show Menu</a> <ul id="menu" style="display:none"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> </ul> </body> </html>