Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [jquery] jak uruchomić z rozwiniętym menu
p_rzemon
post
Post #1





Grupa: Zarejestrowani
Postów: 67
Pomógł: 0
Dołączył: 9.03.2006

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


Witam, mam proste menu rozwijane.

  1. <div id="firstpane" class="menu_list">
  2. <p class="menu_head" id="1">pozycja 1</p>
  3. <div class="menu_body">
  4. <a href="1.html">lista 1</a>
  5. <a href="2.html">lista 2</a>
  6. <a href="3.html">lista 3</a>
  7. </div>
  8. <p class="menu_head" id="2">pozycja 2</p>
  9. <div class="menu_body">
  10. <a href="4.html">lista 4</a>
  11. <a href="5.html">lista 5</a>
  12. <a href="6.html">lista 6</a>
  13. </div>
  14. </div>
  15. </div>


do tego skrypt

  1. $(document).ready(function()
  2. {
  3. //slides the element with class "menu_body" when paragraph with class "menu_head" is clicked
  4. $("#firstpane p.menu_head").click(function()
  5. {
  6. $(this).css({backgroundImage:"url(./images/manuopen.gif)"}).next("div.menu_body").slideToggle(500).siblings("div.menu_body").slideUp("slow");
  7. $(this).siblings().css({backgroundImage:"url(./images/menu.gif)"});
  8. });
  9. //slides the element with class "menu_body" when mouse is over the paragraph
  10. $("#secondpane p.menu_head").mouseover(function()
  11. {
  12. $(this).css({backgroundImage:"url(./images/manuopen.gif)"}).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow");
  13. $(this).siblings().css({backgroundImage:"url(./images/manu.gif)"});
  14. });
  15. });



proszę o podpowiedź co muszę zmienić (jaką funkcję dopisać) żeby uruchamiając 4.html było otwarte "pozycja 2"

Ten post edytował p_rzemon 4.12.2011, 20:29:08
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 21.08.2025 - 18:51