Load client-side accordion with pane open

Posted by superexsl on Stack Overflow See other posts from Stack Overflow or by superexsl
Published on 2010-03-25T21:33:03Z Indexed on 2010/03/25 21:33 UTC
Read the original article Hit count: 360

hey ,

I'm trying to change an AJAX accordion layout on the client-side. How can I make it so that when the page loads, the selected pane is opened? At the moment, I have this:

Sys.require(Sys.components.accordion, function() {
        $("#accordion").accordion({
            HeaderCssClass: "acc_header",
            HeaderSelectedCssClass: "acc_selectedheader",

            FadeTransitions: true,
            requireOpenedPane: false


        });


    });

This works. However, if I add SelectedIndex = 1, it still starts off with the top pane opened and everything else closed. I tried change the 1 to other numbers (including -1), but it doesn't make a difference. Have I missed something here?

(It's placed in an updatepanel, if that makes a difference) Thanks

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about ajaxcontroltoolkit