0

(div とは対照的に) メニューに入れ子になった UL/LI アイテムで jQuery アコーディオンを使用しています。各パネルを必要なだけ大きくしたい (最大のパネルほど大きくしない)。autoHeight: falseを設定しようとしましたが、何もしていません。UL/LI構造で機能させる方法はありますか?

<div class="LeftNav">
    <div class="menu vertical menu-vertical">
        <ul class="root static" id="accordion">
            <li class="static dynamic-children"><a class="static dynamic-children menu-item" title="Information Technology" href="/IT"><span class="additional-background"><span class="menu-item-text">IT</span></span></a>
            <ul class="dynamic">
                <li class="dynamic"><a class="dynamic menu-item" title="IT Requests" href="/IT/requests"><span class="additional-background"><span class="menu-item-text">IT Requests</span></span></a></li>
                <li class="dynamic"><a class="dynamic menu-item" title="Frequently asked questions" href="/IT/faqs"><span class="additional-background"><span class="menu-item-text">FAQs</span></span></a></li>
                <li class="dynamic"><a class="dynamic menu-item" title="Forms" href="/IT/forms"><span class="additional-background"><span class="menu-item-text">Forms</span></span></a></li>
                <li class="dynamic"><a class="dynamic menu-item" title="Child 1" href="/HSE/child1"><span class="additional-background"><span class="menu-item-text">Child 1</span></span></a></li>
            </ul>
            </li>
            <li class="static dynamic-children"><a class="static dynamic-children menu-item" title="HSE" href="/HSE"><span class="additional-background"><span class="menu-item-text">HSE</span></span></a>
                <ul class="dynamic">
                    <li class="dynamic"><a class="dynamic menu-item" title="Child 1" href="/HSE/child1"><span class="additional-background"><span class="menu-item-text">Child 1</span></span></a></li>                    
                </ul>
            </li>
            <li class="static"><a class="static menu-item" title="HSE" href="/commonly-used"><span class="additional-background"><span class="menu-item-text">Commonly Used</span></span></a></li>
            <li class="static"><a class="static menu-item" title="Human Resources, Payroll and Benefits" href="/human-resources-payroll-and-benefits"><span class="additional-background"><span class="menu-item-text">HR, Payroll and Benefits</span></span></a></li><li class="static"><a class="static menu-item" title="Office Services and Supplies" href="/office-services-and-supplies"><span class="additional-background"><span class="menu-item-text">Office Services and Supplies</span></span></a></li><li class="static"><a class="static menu-item" title="Sales, Marketing and Leasing" href="/sales-marketing-and-leasing"><span class="additional-background"><span class="menu-item-text">Sales, Marketing and Leasing</span></span></a></li>
        </ul>
    </div>
</div>
4

2 に答える 2

1

私は彼らがと交換autoHeightしたと思いますheightStyle

http://api.jqueryui.com/accordion/

高さスタイル

タイプ: 文字列

デフォルト: 「自動」

アコーディオンと各パネルの高さを制御します。可能な値:

"auto": All panels will be set to the height of the tallest panel.
"fill": Expand to the available height based on the accordion's parent height.
"content": Each panel will be only as tall as its content.
于 2013-03-18T16:45:45.490 に答える
0

CSSの問題のようです。試す:

menu li {
    height: auto !important;
}
于 2013-03-18T16:40:18.610 に答える