I haven't used that particular script before, so this may be overkill. Does 
this script only allow one segment to remain open at a time? (When you click on 
a closed segment, does any currently-open segment close as the clicked segment 
opens?) If so, you could probably simplify this a lot. But assuming you would 
have to click on the current segment's header to close it, try this:

$$('div.accordion-content button').invoke('observe','click', function(evt){
        if(this.up('div').next('.accordion-content')){
                this.up('div').hide().next('div.accordion-content').show();
        }
});

That script should either appear after the accordion element, or it should be 
wrapped inside a dom:loaded listener.

Walter

On Jan 23, 2012, at 8:53 AM, Cluster wrote:

> hi
> i am using simple accordion script(http://www.p51labs.com/
> accordion/) , it works fine. now i want to place a continue button in
> content of each each tab, if this button is clicked then it should
> open next tab and current tab should collapse. can anyone help me
> please. i am using the below code
> 
> <div id="step1" class="accordion-toggle">Step1</div>
> <div class="accordion-content">
> bla bla bla
> <!--i want to place a continue button here <input type="button"
> value="Continue">-->
> </div>
> 
> thank you
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to