Page 1 of 1

MooTools: Accordion + morphTabs problem

Posted: Wed Jul 02, 2008 4:32 pm
by psurrena
I have a slight issue in all browsers.

I am using morphTabs inside one tab in an Accordion. When it first loads, everything is great but when I go to the second tab and then back to the first, all of the accordion elements are expanded and no longer "active".

Here is an example: http://www.wrtdesign.com/wrt-new/work.php

This might not be too useful, but here is where it's called:

Code: Select all

<script type="text/javascript">
        window.addEvent('domready', function() {
            var morphTabs = new MorphTabs('morphTabs',{
                height:'',
                width:'400px',
                panelStartFx: 'slide:left',
                panelEndFx: 'slide:right'
            });
 
            var myAccordion = new Accordion($('accordion'), 'p.toggler', 'div.element', {
                opacity: true,
                alwaysHide: true,
                show: 5,
                
                onActive: function(toggler, element){
                    toggler.setStyle('margin-bottom','7px');
                },
                
                onBackground: function(toggler, element){
                    toggler.setStyle('margin-bottom','7px');
                }
            });
        });
    </script>
Thank you in advance.

Re: MooTools: Accordion + morphTabs problem - SOLVED

Posted: Thu Jul 03, 2008 8:11 am
by psurrena