Hello,

Superfish jQuery plugin is really great to construct a simple manu.
But it will work on hover event, not click : 
http://users.tpg.com.au/j_birch/plugins/superfish/
If you don't want to use this, you have to do something like that :

// to close your <ul> when clicking on a <li>

$('.menu ul li').click(function(){
                $(this).parent().css({'visibility':'hidden'});
                 /* do other stuff like loading content, http call...
*/
        });
}

You may also use the hide() and show() jquery function, or even
fadeIn / fadeOut or animate() for more fancy tricks...

Good luck
Flo
On Sep 29, 2:26 pm, runrunforest <craigco...@gmail.com> wrote:
> Hi,
>
> I need help to close the ul back up when i click on the white space or
> on the options link.
>
> This is what i've got so far
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/
> libs/jquery/1.3.2/jquery.min.js"></script>
> <script type="text/javascript">
> $(function(){
>         $('.menu').click(function(){
>                 $(this).next('ul').css({'visibility':'visible'});
>         });});
>
> </script>
> <style type="text/css">
> * {margin:0; padding:0;}
> .menu { position:relative;}
> ul { position:absolute; visibility:hidden; border:solid 1px blue }
> ul a {display:block;}
> </style>
> </head>
>
> <body>
> <a href="#" class="menu">options</a>
> <ul>
>         <li><a href="#">game</a></li>
>         <li><a href="#">music</a></li>
>         <li><a href="#">movie</a></li>
> </ul>
>
> </body>
> </html>

Reply via email to