// // In my case I want to load them onload, this is how you do it! // loadAccordions // Event.observe(window, 'load', loadAccordions); // // Set up all accordions // function loadAccordions() { var bottomAccordion = new accordion('storemenu', { // The speed of the accordion resizeSpeed : 8, classNames : { toggle : 'menu_hdr', toggleActive : 'menu_content_inside_active', content : 'menu_content_inside' }, // If you don't want the accordion to stretch to fit // its content, set a value here, handy for horixontal examples. //defaultSize : { // height : null, // width : null //}, // The direction of the accordion direction : 'vertical', // Should the accordion activate on click or say on mouseover? (apple.com) onEvent : 'click' }); // Open first one bottomAccordion.activate($$('#storemenu .menu_hdr')[0]); } // Special thanks go out to Will Shaver @ http://primedigit.com/ var verticalAccordions = $$('#storemenu .menu_hdr'); verticalAccordions.each(function(accordion) { $(accordion.next(0)).setStyle({ height: '0px' }); });