Using Kendo Web PanelBar within a Mobile View

1 posts, 0 answers
  1. Benjamin
    Benjamin avatar
    7 posts
    Member since:
    Aug 2009

    Posted 02 May 2012 Link to this post

    I've added a PanelBar to a view and have it working.  However, I am unable to get this panel bar to fill all available space, without hard codin pixel values, instead of just being as large as content within.

    <head>
        <title></title>
        <script src="kendoui.mobile.2012.1.406.commercial/js/jquery.min.js" type="text/javascript"></script>
        <script src="kendoui.mobile.2012.1.406.commercial/js/kendo.mobile.min.js" type="text/javascript"></script>
        <script src="kendoui.web.2012.1.322.commercial/js/kendo.panelbar.min.js" type="text/javascript"></script>
        <link href="kendoui.web.2012.1.322.commercial/styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
        <link href="kendoui.web.2012.1.322.commercial/styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
        <link href="kendoui.mobile.2012.1.406.commercial/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div data-role="view" data-title="Views">
        <header data-role="header">
            <div data-role="navbar">
                <span data-role="view-title"></span>
                <a data-align="right" data-role="button" class="nav-button" href="#index">Index</a>
            </div>
        </header>
        <ul id="panelBar">
        <li>
            Item 1
            <ul>
                <li>Sub Item 1</li>
                <li>Sub Item 2</li>
            </ul>
        </li>
        <li>
            Item 2
            <ul>
                <li>Sub Item 1</li>
                <li>Sub Item 2</li>
            </ul>
        </li>
    </ul>
    </div>
    <script>
        var app = new kendo.mobile.Application(document.body);
        $(document).ready(function () {
            $("#panelBar").kendoPanelBar();
        });
    </script>
    </body>
    </html>
Back to Top