16 years 7 months ago
Try replacing the code in the moo_faq.js file with this:
[code:1]// Defines the Accordion
function AccordionInit() {
var accTitle = $$('.menuTitle');
var accContent = $$('.content');
var pwAccordion = new Accordion(
accTitle, accContent, {
onActive: function(tog){
tog.addClass('selected');
var accTitleOnOff = new Fx.Styles(tog, {wait: false, duration: 350});
accTitleOnOff.start({
'background-color': '#9e3434',
'color': '#dce6b2',
'border-bottom-color': '#ea2020',
'padding-left': 6
});
},
onBackground: function(tog){
tog.removeClass('selected');
var accTitleOnOff = new Fx.Styles(tog, {wait: false, duration: 350});
accTitleOnOff.start({
'background-color': '#f2f2f2',
'color': '#2f3d31',
'border-bottom-color': '#ddd',
'padding-left': 0
});
},
alwaysHide: true,
duration: 500,
start: 'all-closed' //Makes accordion closed
}
);
// Mouse effects
accTitle.each(function(div) {
var mouseFxs = new Fx.Styles(div, {duration: 250, wait: false});
div.addEvents({
'mouseover': function(){
if (!div.hasClass('selected')) {
mouseFxs.start({
'background-color': '#CCCC99',
'color': '#9e3434',
'border-bottom-color': '#E5E5CC',
'padding-left': 6
});
}
},
'mouseout': function(){
if (!div.hasClass('selected')) {
mouseFxs.start({
'background-color': '#f2f2f2',
'color': '#2f3d31',
'border-bottom-color': '#ddd',
'padding-left': 0
});
}
}
});
});
}
window.addEvent('domready', function(){
AccordionInit();
});[/code:1]
The main thing you are looking for is this:
[code:1]start: 'all-closed' //Makes accordion closed
[/code:1]