spry中自动展开“手风琴”选项卡

发布于 2024-11-15 11:37:25 字数 2504 浏览 4 评论 0原文

这是我的手风琴,当其父配置展开时,如何自动展开“systemAccordion”

<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, useFixedPanelHeights: false });
    </script>
</div>

</div>

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, useFixedPanelHeights: false });
    </script>
</div>

</div>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

亣腦蒛氧 2024-11-22 11:37:25

得到了答案,当我们定义手风琴时,我们有一个像下面这样的选择

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

解决了我的问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文