1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
| <!DOCTYPE html>
| <html>
| <head>
| <meta charset="UTF-8">
| <title>SideMenu Style - jQuery EasyUI Demo</title>
| <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
| <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
| <link rel="stylesheet" type="text/css" href="../demo.css">
| <script type="text/javascript" src="../../jquery.min.js"></script>
| <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
| </head>
| <body>
| <h2>SideMenu Style</h2>
| <p>Collapse the side menu to display the main icon.</p>
| <div style="margin:20px 0;">
| <a href="javascript:;" class="easyui-linkbutton" onclick="toggle()">Toggle</a>
| </div>
| <div id="sm" class="easyui-sidemenu" data-options="data:data"></div>
| <link rel="stylesheet" type="text/css" href="sidemenu_style.css">
| <script type="text/javascript">
| var data = [{
| text: 'Forms',
| iconCls: 'fa fa-wpforms',
| state: 'open',
| children: [{
| text: 'Form Element'
| },{
| text: 'Wizard'
| },{
| text: 'File Upload'
| }]
| },{
| text: 'Mail',
| iconCls: 'fa fa-at',
| selected: true,
| children: [{
| text: 'Inbox'
| },{
| text: 'Sent'
| },{
| text: 'Trash',
| children: [{
| text: 'Item1'
| },{
| text: 'Item2'
| }]
| }]
| },{
| text: 'Layout',
| iconCls: 'fa fa-table',
| children: [{
| text: 'Panel'
| },{
| text: 'Accordion'
| },{
| text: 'Tabs'
| }]
| }];
|
| function toggle(){
| var opts = $('#sm').sidemenu('options');
| $('#sm').sidemenu(opts.collapsed ? 'expand' : 'collapse');
| opts = $('#sm').sidemenu('options');
| $('#sm').sidemenu('resize', {
| width: opts.collapsed ? 60 : 200
| })
| }
| </script>
| </body>
| </html>
|
|