[jQuery] Re: More Superfish Questions
Thanks a ton, Joel! On Oct 6, 10:45 pm, Joel Birch [EMAIL PROTECTED] wrote: On 10/7/07, Ryura [EMAIL PROTECTED] wrote: http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_122.html What I'm asking is if I can do a menu like sample 2 using superfish. Hi Ryura, Sorry for the slow reply. Superfish does not handle this type of menu, but fortunately there is a plugin that does exactly this and it is well maintained and feature-rich. It's the Accordion plugin by Jörn Zaefferer and Frank Marcia. The page to get the plugin is here:http://bassistance.de/jquery-plugins/jquery-plugin-accordion/ Have a look at the demos here, and notice that using click as the event is an option:http://jquery.bassistance.de/accordion/ I have lost track of whether this is the most up to date version of the plugin. The one in the UI collection is probably newer. Good luck. Joel Birch
[jQuery] Re: More Superfish Questions
What do you mean by collapsible ? sounds like an accordion to me... Superfish is an improved version of suckerfish. Suckerfish makes pure css menu compatible with IE. Pseudo-classes like :hover are only possible on a elements in IE. Pure css menus require :hover to be possible on li elements. For IE, Suckerfish attaches by javascript a css class named sfHover to the lis using onmouseover and removes it with onmouseout. Try to look at Suckerfish/Superfish menu in FF with js disable and you will see that it is still working. AFAIK there is no :click pseudo-class in css. Altough it may be sometimes useful (clients and PM often want that kind of last minutes changes), it seems to be deviant from the suckerfish spirit to try to use it on click. But maybe you actually just need something like that : (assuming your menu has the class nav) $(document).ready(function(){ $(ul.nav li).each(function(){ $(this).toggle( function(){ $(this).children(ul).hide(); }, function(){ $(this).children(ul).show(); } ); }); -Olivier Ryura wrote: Hello again, We've decided we wish to do a collapsible menu (on click) with Superfish instead of the general drop down onmouseover. Is this possible with Superfish or should I look into getting another plugin? If it is possible, how would I go about doing it? Thanks, Ryura