Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]jquery menu
DR.GhostRider
post
Post #1





Grupa: Zarejestrowani
Postów: 72
Pomógł: 1
Dołączył: 27.01.2009

Ostrzeżenie: (0%)
-----


Mam problem z menu w jquery
  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3.  
  4. $("h5 a").click(function(){
  5. $(this).css('border-bottom','5px');
  6. $(this).parent().next().toggle("normal");
  7. });
  8.  
  9. $("#show-all").toggle(function(){
  10. $(this).val('Zwiń wszystko');
  11. $(".nav ul").show("normal");
  12. $(this).css('border-bottom','5px');
  13. }, function(){
  14. $(this).val('Rozwiń wszystko');
  15. $(".nav ul").hide("normal");
  16. $(this).css('border-bottom','5px');
  17. });
  18. });
  19.  
  20. <div id="side" style="margin: 5px 0 0 30px;width: 180px;">
  21.  
  22. <div class="nav">
  23. <h5><a href="#" id="show1">cos</a></h5>
  24. <ul style="display:none;" id="menu1">
  25. <li><a href="?show=6">cos tam</a></li>
  26. </ul>
  27. </div>
  28.  
  29. <div class="nav">
  30. <h5><a href="#" id="show2">cos 2</a></h5>
  31. <ul style="display:none" id="menu2">
  32. <li><a href="?show=10">cos tam 2</a></li>
  33. </ul>
  34. </div>
  35.  
  36. <div class="nav">
  37. <h5><a href="#" id="show3">cos 3</a></h5>
  38. <ul style="display:none" id="menu3">
  39. <li><a href="?show=12">cos 3</span></a></li>
  40.  
  41. </ul>
  42. </div>
  43.  
  44. <div class="nav">
  45. <h5><a href="#" id="show4">cos 4</a></h5>
  46. <ul style="display:none" id="menu4">
  47. <li><a href="?show=14">cos 4</a></li>
  48.  
  49. </ul>
  50. </div>


i teraz mam problem z odstępem jak się rozwinie menu ;/
dodalem to ale cos nie działa
$(this).css('border-bottom','5px');

pomocy
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 14:45