[jQuery] Re: Superfish Question: Menu Disappear onclick

2008-07-02 Thread KClough
Thanks Joel, you rock. I ended up going with $(document).ready(function() { $('ul.nav').superfish().click(function(){ $(this).find("ul").hide(); }); }); So the original menu is still there, sometimes new items open in a new window, so I didn't want

[jQuery] Re: Superfish Question: Menu Disappear onclick

2008-07-02 Thread Joel Birch
Arrghh! Third time lucky maybe: $(document).ready(function() { $('ul.nav').superfish(/*options if required*/).click(function() { $(this).find('li.sfHover').hideSuperfishUl(); }); }); Fairly confident this time :) Joel Birch.

[jQuery] Re: Superfish Question: Menu Disappear onclick

2008-07-02 Thread Joel Birch
Sorry - I interpreted your request wrong I think. Try this instead: $(document).ready(function() { $('ul.nav').superfish(/*options if required*/).find('li').click(function() { $(this).hideSuperfishUl(); }); }); ...untested, but you never know your luck. Actually, you can probably

[jQuery] Re: Superfish Question: Menu Disappear onclick

2008-07-02 Thread Joel Birch
Hello, How about this - or something very like it: $(document).ready(function() { $('ul.nav').superfish().click(function(){ $(this).hide(); }); }); I guess clicking anywhere in the nav is suitable. Might not need to attach the click handler to the links really. You may want to e