KendoUI系列:PanelBar

<link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2014.1.318/kendo.default.min.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/kendo/2014.1.318/jquery.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/kendo/2014.1.318/kendo.web.min.js")" type="text/javascript"></script>
<ul id="panelbar">
    <li>
        <h2>Season</h2>
        <div>
            <ul>
                <li>Spring</li>
                <li>Summer</li>
                <li>Autumn</li>
                <li>Winter</li>
            </ul>
        </div>
    </li>
    <li class="k-state-active">
        <h2>Weekday</h2>
        <div>
            <ul>
                <li> Sunday</li>
                <li>Monday</li>
                <li> Tuesday</li>
                <li>Wednesday</li>
                <li>Thursday</li>
                <li>Friday</li>
                <li>Saturday</li>
            </ul>
        </div>
    </li>
    <li>
        <h2>Direction</h2>
        <div>
            <ul>
                <li>East</li>
                <li>South</li>
                <li>West</li>
                <li>North</li>
            </ul>
        </div>
    </li>
</ul>
<script type="text/javascript">
    $(function () {
        $("#panelbar").kendoPanelBar({
            expandMode: "single" // 设置展开模式只能展开单个
        });
    });
</script>

  效果预览:

  说明:将需要展开项中的class设置为k-state-active即可在加载完成时默认展开。

posted @ 2014-06-10 19:15  libingql  阅读(2215)  评论(0编辑  收藏  举报