I would suggest that you show/hide the unordered lists, rather than
the anchors within them. This is most likely why what you're trying
didn't work: you've hidden the <a> elements, but you've targeted the
<ul> elements for the .slideDown(). Also, if you use .slideToggle(),
you get .slideup and .slideDown in a single call. Try this:

$(function(){
        $('#menue ul').hide();
        $('#menue li a').click(function(){
                $(this).next('ul').slideToggle();
                return false;
        });
});


- jason



On Mar 9, 6:58 pm, Frika <[EMAIL PROTECTED]> wrote:
> Hello everybody,
> this post begins as so often. I´m a newbie and I need some help from
> other jquery user. I think it´s an easy thing for those who has some
> more expierience than I.
> I have a list (simplified):
> <ul #menue>
>   - <li>projects
>   -  - <ul>
>   -  -  - <li>Project 1<li>
>   -  -  - <li>Project 2<li>
>   -  -</ul>
>   -</li>
>   -<li>Contact</li>
> </ul>
>
> The list elements have some different classes. The list is provided
> from an CMS. In the beginning the submenus should be hidden. What I
> want to achieve is simple: The click on the menu 'project' should
> slide down the ul with the projects. This is my try.
>
> $(document).ready(function(){
> $("ul#menue li ul li a.menu-child").hide();   // this is work
>
> $("ul#menue li a").click(function(){
>                         $(this).siblings().slideDown("fast");
>                         return false;
>                 });
>
> });
>
> I´ve tried a different things but it won´t work. I´m sure someone of
> yours could help me. A link to helpful sites is welcome, too.
> Thank you all.
>
> Frika

Reply via email to