Witam, mam proste menu rozwijane.
<div id="firstpane" class="menu_list"> <p class="menu_head" id="1">pozycja 1
</p> <a href="1.html">lista 1
</a> <a href="2.html">lista 2
</a> <a href="3.html">lista 3
</a> <p class="menu_head" id="2">pozycja 2
</p> <a href="4.html">lista 4
</a> <a href="5.html">lista 5
</a> <a href="6.html">lista 6
</a>
do tego skrypt
$(document).ready(function()
{
//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked
$("#firstpane p.menu_head").click(function()
{
$(this).css({backgroundImage:"url(./images/manuopen.gif)"}).next("div.menu_body").slideToggle(500).siblings("div.menu_body").slideUp("slow");
$(this).siblings().css({backgroundImage:"url(./images/menu.gif)"});
});
//slides the element with class "menu_body" when mouse is over the paragraph
$("#secondpane p.menu_head").mouseover(function()
{
$(this).css({backgroundImage:"url(./images/manuopen.gif)"}).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow");
$(this).siblings().css({backgroundImage:"url(./images/manu.gif)"});
});
});
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