边栏上的数据不会出现

时间:2016-07-28 05:27:29

标签: javascript webix

我试图使用我在下面看到的html来开发webix标题和侧边栏。目前它是用javascript开发的。

http://docs.webix.com/samples/28_sidemenu/01_sidebar.html

我正在从javascript更改为html

html中出现标题,图标,侧栏eveything,但侧栏上的内容不会出现。我不确定我所做的错误是什么。以下是我的代码。

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="./codebase/webix.css" type="text/css"
    media="screen" charset="utf-8">
<link rel="stylesheet" href="./codebase/sidebar.css" type="text/css"
    media="screen" charset="utf-8">
<script src="./codebase/webix.js" type="text/javascript" charset="utf-8"></script>
<script src="./codebase/sidebar.js" type="text/javascript"
    charset="utf-8"></script>
<script src="./codebase/data.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>

    <script type="text/javascript" charset="utf-8">
        webix.ready(function() {
            webix.markup.init();
        });

        function toggle(){
            $$("$sidebar1").toggle()
        }

    </script>

    <div class="container" id="mainDiv"></div>

    <div data-view="rows">

        <div data-view="toolbar" data-padding="5">

            <div data-view="button" data-type="icon" data-icon="bars"
                data-width="37" data-align="left" data-css="app_button"
                data-click="toggle()"></div>
            <div data-view="label" data-label="My App"></div>

            <div data-view="button" data-type="icon" data-icon="envelope-o"
                data-width="45" data-css="app_button" data-badge="4"></div>
            <div data-view="button" data-type="icon" data-icon="bell-o"
                data-width="45" data-css="app_button" data-badge="10"></div>
        </div>
    </div>
    <div data-view="cols">
        <div data-view="sidebar" data-id="sidebar" data-data="menu_data"></div> 

    </div>

</body>
</html>

0 个答案:

没有答案