forked from hippietrail/jQuery-Splitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vsplitter-1.3.html
121 lines (100 loc) · 5.12 KB
/
vsplitter-1.3.html
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery Vertical splitter</title>
<script type="text/javascript" src="jquery-1.3.js"></script>
<script type="text/javascript" src="jquery.cookie.js"></script>
<script type="text/javascript" src="splitter.js"></script>
<!-- General page styles (not critical to the demos) -->
<link rel="stylesheet" type="text/css" href="main.css" />
<style type="text/css" media="all">
.splitter {
height: 400px;
margin: 1em 3em;
border: 4px solid #bdb;
background: #f8fff8;
}
.ui-state-default { background-color: #aca }
.ui-state-hover { background-color: #bdb }
.ui-state-highlight { background-color: #add }
.ui-state-error { background-color: #eaa }
.splitter-pane {
overflow: auto;
}
.splitter-bar-vertical {
width: 6px;
background-image: url(img/vgrabber.gif);
background-repeat: no-repeat;
background-position: center;
}
.splitter-bar-vertical-docked {
width: 10px;
background-image: url(img/vdockbar-trans.gif);
background-repeat: no-repeat;
background-position: center;
}
.splitter-bar.ui-state-highlight {
opacity: 0.7;
}
.splitter-iframe-hide {
visibility: hidden;
}
</style>
<script type="text/javascript">
$().ready(function() {
makeSplitter();
});
function makeSplitter()
{
$("#MySplitter").splitter({
type: "v",
outline: true,
sizeLeft: 150,
minLeft: 100,
minRight: 100,
resizeToWidth: true,
dock: "right",
dockSpeed: 200,
cookie: "docksplitter",
dockKey: 'Z', // Alt-Shift-Z in FF/IE
accessKey: 'I' // Alt-Shift-I in FF/IE
});
}
</script>
</head>
<body>
<h1>jQuery Docking Splitter</h1>
<p>
This example demonstrates the use of a <em>docking</em> splitbar that animates a full move to the left or right.
Undocking the splitter returns the splitbar to the position it had before docking.
The user can also drag the splitbar in or out of the docked position.
If the splitter specifies a minimum or maximum value for the left or right pane, those values will be enforced
whenever the splitbar is undocked.
</p>
<p>
<a href="index.html">See the splitter documentation</a>
</p>
<div id="MySplitter">
<div id="LeftPane">
<p>This is the left side of the vertical splitter. Typically you might use this side for a navigational display of some data that is related to the right side.</p>
<p>Using CSS styles you can control the look of the splitter, such as its color, width, and appearance when selected. Or, you can specify most options when you call the plugin to create the splitter.</p>
<p><a href="javascript:void($('#MySplitter').trigger('toggleDock'))">trigger toggleDock</a></p>
<p><a href="javascript:void($('#MySplitter').trigger('dock'))">trigger dock</a></p>
<p><a href="javascript:void($('#MySplitter').trigger('undock'))">trigger undock</a></p>
<p><a href="javascript:void($('#MySplitter').trigger('destroy'))">trigger destroy</a></p>
</div>
<div id="RightPane">
<p>This is the right side of the vertical splitter. Usually this side will be wider than the left side, but that's up to you. The left pane of this demo was set to be 150 pixels wide in the stylesheet, which is why the right pane is initially larger. If you don't specify a width for either panes when the splitter is created, the two panes will be equal width.</p>
<p>This is the right side of the vertical splitter. Usually this side will be wider than the left side, but that's up to you. The left pane of this demo was set to be 150 pixels wide in the stylesheet, which is why the right pane is initially larger. If you don't specify a width for either panes when the splitter is created, the two panes will be equal width.</p>
<p>This is the right side of the vertical splitter. Usually this side will be wider than the left side, but that's up to you. The left pane of this demo was set to be 150 pixels wide in the stylesheet, which is why the right pane is initially larger. If you don't specify a width for either panes when the splitter is created, the two panes will be equal width.</p>
<p>The splitter plugin supports the use of the keyboard to move the splitbar via the browser's accessKey feature. To move the splitbar in IE or Firefox, press <kbd>Alt-Shift-L</kbd>, then press the arrow keys. To unfocus the splitbar, press <kbd>Tab</kbd>. In Opera, press <kbd>Shift-Esc</kbd> and then the letter <kbd>L</kbd>; remove focus with <kbd>Esc</kbd>.</p>
<p><a href="javascript:void($('#MySplitter').trigger('toggleDock'))">trigger toggleDock</a></p>
<p><a href="javascript:void($('#MySplitter').trigger('dock'))">trigger dock</a></p>
<p><a href="javascript:void($('#MySplitter').trigger('undock'))">trigger undock</a></p>
<p><a href="javascript:void($('#MySplitter').trigger('destroy'))">trigger destroy</a></p>
</div>
</div>
</body>
</html>