/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"> <head> <script> $(document).ready(function(){ $("dd:not(:first)").hide(); $("dt a").click(function(){ $("dd:visible").slideUp("slow"); $(this).parent().next().slideDown("slow"); return false; }); }); </script> <style> body { font-family: Arial; font-size: 16px; } dl { width: 300px; } dl,dd { margin: 0; } dt { background: #F39; font-size: 18px; padding: 5px; margin: 2px; } dt a { color: #FFF; } dd a { color: #000; } ul { list-style: none; padding: 5px; } </style> </head> <body> <dl> <dd> <ul> </ul> </dd> <dd> <ul> </ul> </dd> <dd> <ul> </ul> </dd> </dl> </body> </html>