Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne][PHP]Wysówane menu problem
maciej916
post 17.01.2012, 15:10:11
Post #1





Grupa: Zarejestrowani
Postów: 43
Pomógł: 0
Dołączył: 13.06.2011

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


Mam taki kod menu:
Kod
echo "<div class='top'>";
echo "<ul class='topnav2'>";

echo "<ul class='topnav'>";
echo "<li>";
echo "<a class='menu' alt='Rozwiń Menu'>Profil<img src='".THEME."images/menu/subnav_btn.png' /></a>";
echo "<ul class='subnav'>";
echo "<li><a href='#'>Edycja Profilu</a></li>";
echo "<li><a href='#'>Prywatne Wiadomosci</a></li>";
echo "<li><a href='#'>Lista Użytkowników</a></li>";
echo "<li><a href='#'>Wyloguj Się</a></li>";
echo "</ul>";
echo "</li>";
echo "</ul>";
echo "</div>\n";



i taki js:
Kod
"<script type='text/javascript'>
$(document).ready(function(){

        $('ul.subnav').parent().append('<span></span>'); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)

        $('ul.topnav li span').click(function() { //When trigger is clicked...

                //Following events are applied to the subnav itself (moving subnav up and down)
                $(this).parent().find('subnav').slideDown('fast').show(); //Drop down the subnav on click

                $(this).parent().hover(function() {
                }, function(){
                        $(this).parent().find('subnav').slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
                });

                //Following events are applied to the trigger (Hover events for the trigger)
                }).hover(function() {
                        $(this).addClass('subhover'); //On hover over, add class 'subhover'
                }, function(){  //On Hover Out
                        $(this).removeClass('subhover'); //On hover out, remove class 'subhover'
        });

});
</script>"



I chce aby na klasę menu wysuwało się menu.

pomużcie
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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 14:25