problem with slidetoggle

problem with slidetoggle

In this website i try to use a navigation with a pulldown menu. Unfortunately i'm totally new to using js and i have no idea how to solve problems like this. May can you help me with either giving me instructions about how to solve problems generally or/and solving the given problem for me? Thanks

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>

  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Unbenanntes Dokument</title>
  6. <script src="jquery-1.8.0.min.js"></script>
  7. <script src="my_jquery_src.js"></script>
  8. <link href="CSS/Vorlage.css" rel="stylesheet" type="text/css" />
  9. </head>

  10. <body>

  11. <!--Äußerer Rahmen-->
  12. <div id="wrap">

  13. <!--Navigationsleiste-->
  14. <div id="navigation">

  15. <!--Home-->
  16. <a href="">
  17. <div id="home" >
  18. <h1>Home</h1>
  19. </div>
  20. </a>

  21. <!--Allgemeines-->
  22. <div id="pulldown">
  23. <a href="">
  24. <div id="allgemeines">
  25. <h1>Home</h1>
  26. </div>
  27. </a>
  28. <div id=menu>
  29. <div></div>
  30. <div></div>
  31. <div></div>
  32. <div></div>
  33. <div></div>
  34. <div id="last"></div>
  35. </div>
  36. </div>

  1. $(document).ready(function(){
  2.   $("#allgemeines").click(function(){
  3.     $("#menu").slidetoggle("slow");
  4.   });
  5.  });

  1. @charset "utf-8";

  2. html {
  3.     margin: 0;
  4.     padding: 0;
  5. }

  6. body  {
  7.     margin: 0;
  8.     padding: 0;
  9.     text-align: center; 
  10.     color: #797979;
  11.     font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
  12.     font-size: 11px;
  13.     background-color: #FFF;
  14.     font-weight: normal;
  15. }

  16. #wrap {
  17.     width: 930px;
  18.     margin-top: 50px;
  19.     margin-right: auto;
  20.     margin-bottom: 0;
  21.     margin-left: auto;
  22.     top: 0px;
  23.     position: relative;
  24. }

  25. #navigation{
  26.     width: 930px;
  27.     height: 30px;
  28.     background-image:url(../JPGs/Navi.jpg);
  29.     z-index:1;
  30. }

  31. #home{
  32.     margin-left:10px;
  33. }

  34. #home , #about_us , #contact , #newsletter , #agb , #impressum , #pulldown{
  35.     width: 130px;
  36.     height: 30px;
  37.     background-image: url(../JPGs/NaviBtn.jpg);
  38.     float:left;
  39. }

  40. #menu{
  41.     display:none
  42. }

  43. #wrap #navigation #pulldown div {
  44.     height: 30px;
  45.     width: 130px;
  46. }

  47. #wrap #navigation #menu div{
  48.     background-color:#ffe600;
  49. }

  50. #wrap #navigation #menu #last{
  51.     background-image:url(../JPGs/NaviBtnLast.jpg);
  52. }

  53. #wrap #navigation #menu #last:hover , #wrap #navigation #menu #last:active{
  54.     background-image:url(../JPGs/NaviBtnLastActive.jpg);
  55. }



  56. #home:hover , #allgemeines:hover , #about_us:hover  , #contact:hover  , #newsletter:hover  , #agb:hover  , #impressum:hover , #home:active , #allgemeines:active , #about_us:active  , #contact:active  , #newsletter:active  , #agb:active  , #impressum:active{
  57.     background-image:url(../JPGs/NaviBtnActive.jpg);
  58. }

  59. #wrap #navigation #menu div:active , #wrap #navigation #menu div:hover {
  60.     background-image:url(../JPGs/NaviBtn.jpg);
  61. }

  62. #home:hover h1 , #pulldown #allgemeines:hover h1 , #about_us:hover h1  , #contact:hover h1  , #newsletter:hover h1  , #agb:hover h1 , #impressum:hover h1 , #wrap #navigation #pulldown div:hover , #home:active h1 , #allgemeines:active h1 , #about_us:active h1  , #contact:active h1  , #newsletter:active h1  , #agb:active h1  , #impressum:active h1 , #wrap #navigation #pulldown div:active h1{
  63.     color:#000099;
  64. }

  65. #home h1 , #allgemeines h1 , #about_us h1 , #contact h1 , #newsletter h1 , #agb h1 , #impressum h1 , #wrap #navigation #menu div h1 {
  66.     font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  67.     font-size: 18px;
  68.     text-decoration: underline;
  69.     position: absolute;
  70.     top: 4px;
  71. }

  72. #home h1{
  73.     left: 51px;
  74. }

  75. #allgemeines h1{
  76.     left: 181px;
  77. }

  78. #about_us h1{
  79.     left: 298px;
  80. }

  81. #contact h1{
  82.     left: 432px;
  83. }

  84. #newsletter h1{
  85.     left: 550px;
  86. }

  87. #agb h1{
  88.     left: 707px;
  89. }

  90. #impressum h1{
  91.     left: 811px;
  92. }

  93. #changing_pictures{
  94.     width:930px;
  95.     height:500px;
  96.     position:absolute;
  97.     top:900px;
  98.     left:0px;
  99.     z-index:0;
  100. }

  101. a {
  102.     color: #797979;
  103.     text-decoration: none;
  104. }

  105. h1 {
  106.     color: #858585;
  107.     font-size: 22px;
  108.     font-style: italic;
  109.     font-weight: bolder;
  110.     margin-top: 0px;
  111.     margin-right: 20px;
  112.     margin-bottom: 0px;
  113.     margin-left: 0px;
  114.     float: right;
  115.     font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  116. }

  117. h1:first-letter {
  118.     margin-left: 0px;
  119. }

  120. h2 {
  121.     font-size: 16px;
  122.     font-weight: bold;
  123.     margin-top: 0px;
  124.     margin-right: 0px;
  125.     margin-bottom: 5px;
  126.     margin-left: 0px;
  127. }

  128. h3 {
  129.     font-size: 12px;
  130.     font-weight: bold;
  131.     padding: 0px;
  132.     margin-top: 5px;
  133.     margin-right: 0px;
  134.     margin-bottom: 5px;
  135.     margin-left: 0px;
  136. }

  137. img {
  138.     border-top-style: none;
  139.     border-right-style: none;
  140.     border-bottom-style: none;
  141.     border-left-style: none;
  142. }

  143. p {
  144.     margin-top: 5px;
  145.     margin-right: 0px;
  146.     margin-bottom: 5px;
  147.     margin-left: 0px;
  148.     font-weight: normal;
  149. }

  150. strong {
  151.     font-weight: bold;
  152. }

  153. ul {
  154.     margin-top: 3px;
  155.     margin-bottom: 3px;
  156.     padding-left: 50px;
  157. }