[jQuery] Re: Hover vs Click, etc.

2009-02-16 Thread David Blomstrom
Thanks, Stephen; that works beautifully. I used the escape quotes because I'm working in PHP. However, I tried your code without the escape quotes, and it works just fine. I'll have ty give that close button a try, too. Thanks again. * * * * * On Mon, Feb 16, 2009 at 3:36 AM, Stephan Veigl wrote

[jQuery] Re: Hover vs Click, etc.

2009-02-16 Thread Stephan Veigl
Hi David, a close button is quite simple, see: http://jsbin.com/ocoyo/edit for an example 1. Why do you escape the quotes in $(\'#triggerReg\')? Is this just a copy&paste error, or do you define your function in an HTML attribute? 2. The click handle does take only one callback function (in c

[jQuery] Re: Hover vs Click, etc.

2009-02-16 Thread David Blomstrom
I haven't learned how to make a close button yet. I tried the second method, but I'm doing something wrong. I combined the two scripts as follows, but it doesn't work. $(\'#triggerReg\').click(function(){ $(\'#menuReg\').show(); },function(){ $("#menuReg").click( function(){ $(this).hide();

[jQuery] Re: Hover vs Click, etc.

2009-02-16 Thread Stephan Veigl
Hi, I would add a close button (or link) to your links div and add something like: closeBtn.click( function(){ $(this).parent().hide(); }); alternatively you can do: $("#menuReg").click( function(){ $(this).hide(); return true; }); Than your menu is closed whenever you click somewhere w