Perfect... Thank You!

I'm posting my code here so that whomever revises the demo can add
this...

var myAccordion = new Accordion($('accordion'), 'h3.toggler',
'div.element', {
                opacity: false,
                onActive: function(toggler, element){
                        toggler.setStyle('color', '#FF0000');
                },
                onBackground: function(toggler, element){
                        toggler.setStyle('color', '#663333');
                },
                onComplete: function(element){
                   if(element.getSize().y>0){
                          element.setStyle('height','auto');
                        }
                     element.scrollIntoView(true);
                },
});


On Dec 15, 10:52 am, cesarcesar <[email protected]> wrote:
> @jbmoore -
>
> Here's the solution. Happy 
> Coding!http://www.webdeveloper.com/forum/showthread.php?p=960200#post960200
>
>
>
> jbmoore wrote:
>
> > New to MooTools and really was attracted to the accordion plugin.  I
> > used the exact code in the demo and just replaced the "text" with a
> > table. (and some color styles) Otherwise did not change any code.
> > (downloaded the latest core and  more.   The tables vary from about 6
> > to 20 rows so some tables do bleed below the fold of the browser
> > viewport.
>
> > The problem I'm seeing and think will be disconcerting to a user is
> > that under certain conditions, when you click certain accordion
> > elements, the table  "scrolls up" so the clicked element (which is a
> > statement) scrolls out of sight..
>
> > You can see the effect here.. (tested in FireFox 3 on Mac OSX -
> > 1440x900 resolution and IE7 on Windows XP)
>
> >http://www.sonicwebtech.com/paypalestimate.html
>
> > As a demo click the following statements after it loads..
>
> > 1) Scroll down so you can see all of the lower statements after the
> > "Company and ..."
> > 2) CLICK the statement "We are not sure what PayPal solution is best
> > for our needs."
> > 3) For me the statement now scrolls "UP" off the browser viewport.
>
> > I would have expected the statement to stay in it's current location
> > and the table to open "down" .
>
> > Hopefully you see what I mean..
>
> > If so, any suggestions on how to prevent this behavior..
>
> > Thank you...
>
> > John..
>
> -----
>
> Cesar Villacahttp://www.cesarvillaca.comhttp://www.cesarvillaca.com
> --
> View this message in 
> context:http://n2.nabble.com/Accordion---scrolls-up-instead-of-down-tp1636986...
> Sent from the MooTools Users mailing list archive at Nabble.com.

Reply via email to