开发者

Expand Accordion tab automatically in spry

This is my Accordion, How can I expand "systemAccordion" automatically when its parent Configuration is expanded

<div spry:region="mainData">
<div class="Accordion" id="mainAccordion" tabindex="0">
    <div class="AccordionPanel"><!-- <img align="left" src="/csm/include/images/healthicon.gif"> -->
        <div class="AccordionPanelTab"> <a onClick="showHealthCheckSpan();"><img align="left" src="/csm/include/images/healthicon.gif">Health Check</a></div>

    </div>
    <div class="AccordionPanel"><!-- <img align="left" src="/csm/include/images/conficon.gif"> -->
        <div class="AccordionPanelTab"> <a onClick="showSystemSpan();"><img align="left" src="/csm/include/images/conficon.gif">Configuration</a></div>
        <div class="AccordionPanelContent">

            <div class="Accordion" id="systemAccordion" tabindex="1">
                <div class="AccordionPanel">
                    <div class="AccordionPanelTab">    <a onClick="showSystemSpan();">System</a></div>
                    <div class="AccordionPanelContent">
                        <a onClick="showKernelParamSpan();">Kernel Parameters</a><br/>
                        <a onClick="showDiskSpan();">Disk Usage</a><br/>
                    </div>
                </div>
                <div class="AccordionPanel">
                    <div class="AccordionPanelTab">    {mainData::@product}</div>
                    <div class="AccordionPanelContent">
                        <span id='selectodbc'><a onClick="showOdbcSpan();">ODBC</a></span><br/>
                        <span id='selectbitmode'><a onClick="showBitmodeSpan();">Bitmode</a></span><br/>
                        <br/>
                    </div>
                </div>
                <script type="text/javascript">
                    var sysAcc = new Spry.Widget.Accordion("systemAccordion",  {defaultPanel: -1, useFixedPanelHeights: false });
                </script>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        var mainAcc = new Spry.Widget.Accordion("mainAccordion",{ defaultPanel: -1, u开发者_Go百科seFixedPanelHeights: false });
    </script>
</div>

</div>


Got the answer, When we define the accordion we have a choice like below

<script type="text/javascript">
    var sysAcc = new Spry.Widget.Accordion("systemAccordion",  {defaultPanel: 0, useFixedPanelHeights: false });
</script>

Solved my problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜