On 6/24/05, Ashish Goyal <[EMAIL PROTECTED]> wrote:
> Below is the more efficient way of achieving the same thing with less lines
> of code. Previously I had some typo in my code so it wasn't working ;)
> function headerTextColor()
> {
> // accordion1 is an id of the accordion
>
> for(var i=0; i<accordion1.numChildren; i++){
> var header = accordion1.getHeaderAt(i);
> i==accordion1.selectedIndex ? header.setStyle("color", 0xFF0000)
> : header.setStyle("color", 0x000000);
> }
>
> }
I'd do something like the above in the handler for the accordion's
'change' event. Set the color of the currently selected one and reset
the one for the last selected one (no need to iterate over all
children).
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/