__________________
Feel free to thank people if they help you by clicking thanks at a post.
=================================
Make it idiot proof and someone will make a better idiot.
=================================
Realise the impotence of proof reading everything you publish
If it closes when you click an opened one again you can do it like this I think. Got the openClose: true from the samples on the Moo website.:
Code:
<script type="text/javascript">
window.addEvent('domready', function() {
//make the accordion
var accordion = new Accordion($$('.toggler'),$$('.element'), {
opacity: 0,
onActive: function(toggler) { toggler.setStyle('color', '#0072BC'); },
onBackground: function(toggler) { toggler.setStyle('color', '#222'); }
openClose : true;
});
//make it open on hover
$$('.toggler').addEvent('mouseenter', function() { this.fireEvent('click'); });
//make it close on mouseleave
$$('.toggler').addEvent('mouseleave', function() { this.fireEvent('click'); });
});
window.addEvent('domready', function() {
//make the accordion
var MyAccordion = new Accordion($$('.MyAcctoggler'),$$('.MyAccelement'), {
display: -1,
opacity: 0,
onActive: function(MyAcctoggler) { MyAcctoggler.setStyle('color', '#0072BC'); },
onBackground: function(MyAcctoggler) { MyAcctoggler.setStyle('color', '#222'); }
openClose : true;
});
//make it open on hover
$$('.MyAcctoggler').addEvent('mouseenter', function() { this.fireEvent('click');
//make it close on mouseleave
$$('.toggler').addEvent('mouseleave', function() { this.fireEvent('click'); });
});
});
</script>
__________________
Feel free to thank people if they help you by clicking thanks at a post.
=================================
Make it idiot proof and someone will make a better idiot.
=================================
Realise the impotence of proof reading everything you publish