newbie problem

newbie problem

Hi to you all!

I am very new to jquery and javascript and i have a problem. 

I found a jquery menu on the web and put it to my webpage. The menu consists out of <li> tags. And now I would like to change the visibility of content divs; so i click on the menu and the content displayed disapears and the coresponding content to the menu appears. I tried adding id's to <li> and all sorts of stuff but nothing worked. The point is that i have 5 content divs and i only change the visibilities.

I apologise for my bad language, here's some code:

  1.                                          <ul id="menu">
  2. <li value="1" id="home"><a href="#">Domov</a></li>
  3. <li id="pay"><a href="#">Opis plačil</a></li>
  4. <li id="betPlace"><a href="#">Opis stavnic</a></li>
  5. <li id="bets"><a href="#">Vrste stav</a></li>
  6. <li id="contact"><a href="#">Kontakt</a></li>
  7. </ul>


  8. <!-- here are the content divs-->

  9.                                 <div id="domov" class="vsebina">
  10. To je Domov
  11. </div>
  12. <div id="placila" class="vsebina">
  13. Gremo na plačila!
  14. </div>
  15. <div id="stavnice" class="vsebina"></div>
  16. <div id="stave" class="vsebina"></div>
  17. <div id="kontakt" class="vsebina"></div>


  18. *********jquery*********
  19. var zadnji="domov";
  20. $(document).ready(function(){
  21. $("#home").click(function() {
  22. $("#"+zadnji).fadeOut("slow", function(){
  23. $("#domov").fadeIn("slow");
  24. });
  25. zadnji="domov";
  26. });
  27. $("#pay").click(function() {
  28. $("#"+zadnji).fadeOut("slow", function(){
  29. $("#placila").fadeIn("slow");
  30. });
  31. zadnji="placila";
  32. });
  33. });
This code doesn't work.

Thanks a lot for your help!