1
|
<!DOCTYPE html
|
2
|
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
<head>
|
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
<title>jsTree v.1.0 - hotkeys documentation</title>
|
8
|
<script type="text/javascript" src="../_lib/jquery.js"></script>
|
9
|
<script type="text/javascript" src="../_lib/jquery.cookie.js"></script>
|
10
|
<script type="text/javascript" src="../_lib/jquery.hotkeys.js"></script>
|
11
|
<script type="text/javascript" src="../jquery.jstree.js"></script>
|
12
|
|
13
|
<link type="text/css" rel="stylesheet" href="syntax/!style.css"/>
|
14
|
<link type="text/css" rel="stylesheet" href="!style.css"/>
|
15
|
<script type="text/javascript" src="syntax/!script.js"></script>
|
16
|
</head>
|
17
|
<body>
|
18
|
<div id="container">
|
19
|
|
20
|
<h1>jsTree v.1.0 - hotkeys plugin</h1>
|
21
|
<h2>Description</h2>
|
22
|
<div id="description">
|
23
|
<p>The <code>hotkeys</code> plugin enables keyboard navigation and shortcuts. Depends on the <a href="http://github.com/jeresig/jquery.hotkeys/">jquery.hotkeys plugin</a></p>
|
24
|
</div>
|
25
|
|
26
|
<h2 id="configuration">Configuration</h2>
|
27
|
<div class="panel configuration">
|
28
|
<p>Expects an object:<br />each key is the keyboard shortcut (for possible values check <a href="http://github.com/jeresig/jquery.hotkeys/">the hotkeys plugin</a>)<br />each values is a function executed in the instance's context, the return value is used as a return value for the event.</p>
|
29
|
<p>Simple example:</p>
|
30
|
<p><code>"del" : function () { this.remove(); }</code></p>
|
31
|
|
32
|
</div>
|
33
|
|
34
|
<h2 id="demos">Demos</h2>
|
35
|
<div class="panel">
|
36
|
|
37
|
<h3>Using the hotkeys plugin</h3>
|
38
|
<p>Try pressing <code>up</code>/<code>down</code>/<code>left</code>/<code>right</code>/<code>space</code>/<code>f2</code>/<code>del</code>.</p>
|
39
|
<div id="demo1" class="demo">
|
40
|
<ul>
|
41
|
<li id="phtml_1">
|
42
|
<a href="#">Root node 1</a>
|
43
|
<ul>
|
44
|
<li id="phtml_2">
|
45
|
<a href="#">Child node 1</a>
|
46
|
</li>
|
47
|
<li id="phtml_3">
|
48
|
<a href="#">Child node 2</a>
|
49
|
</li>
|
50
|
</ul>
|
51
|
</li>
|
52
|
<li id="phtml_4">
|
53
|
<a href="#">Root node 2</a>
|
54
|
</li>
|
55
|
</ul>
|
56
|
</div>
|
57
|
<script type="text/javascript" class="source">
|
58
|
$(function () {
|
59
|
$("#demo1").jstree({
|
60
|
"core" : { "initially_open" : [ "phtml_1" ] },
|
61
|
"plugins" : ["themes","html_data","ui","crrm","hotkeys"]
|
62
|
});
|
63
|
});
|
64
|
</script>
|
65
|
|
66
|
</div>
|
67
|
|
68
|
<h2 id="api">API</h2>
|
69
|
<div class="panel api">
|
70
|
|
71
|
<h3 id="enable_hotkeys">.enable_hotkeys ( )</h3>
|
72
|
<p>Enable shortcuts on the instance (enabled by default).</p>
|
73
|
|
74
|
<h3 id="disable_hotkeys">.disable_hotkeys ( )</h3>
|
75
|
<p>Disable shortcuts on the instance.</p>
|
76
|
|
77
|
</div>
|
78
|
|
79
|
</div>
|
80
|
</body>
|
81
|
</html>
|