-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
219 lines (179 loc) · 6.97 KB
/
index.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Slide Panel, Another JQuery Panel Plugin</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="src/jquery.slidePanel.0.0.1.js"></script>
<link rel="stylesheet" type="text/css" href="css/slidepanel.css"></link>
<script type="text/javascript">
$(document).ready(function(){
$("#a_panel").panel({
handle:'#a_panel > .panel_tab',
content:'#a_panel > .panel_content',
opened:true,
direction : "both",
openedSize : 180,
openEvent : 'mouseenter',
closeEvent : 'mouseleave',
openSelector : '#a_panel',
closeSelector : '#a_panel',
});
$("#b_panel").panel({
handle:'#b_panel > .panel_tab',
content:'#b_panel > .panel_content',
opened:false,
hidden:false,
direction : "both",
openedSize : 180,
openEvent : 'mouseenter',
closeEvent : 'mouseleave',
openSelector : '#b_panel',
closeSelector : '#b_panel'
});
$("#c_panel").panel({
handle:'#c_panel > .panel_tab',
content:'#c_panel > .panel_content',
opened:false,
hidden:false,
direction : "both",
openedSize : 250,
openEvent : 'mouseenter',
closeEvent : 'mouseleave',
openSelector : '#c_panel',
closeSelector : '#c_panel'
});
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-4803873-2']);
_gaq.push(['_setDomainName', '.robincwillis.com']);
_gaq.push(['_trackPageview','/CharCycle']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="container">
<h1>Slide Panel</h1>
<h2>Another JQuery Panel Plugin.</h2>
<div id="content">
<div id="header">
<!-- Demo Header -->
<div id="demo_panel">
<div id="a_panel" class="panel left">
<div class="panel_tab right"></div>
<div class="panel_content left"></div>
</div>
<div id="b_panel" class="panel left">
<div class="panel_tab right"></div>
<div class="panel_content left"></div>
</div>
<div id="c_panel" class="panel right">
<div class="panel_content"></div>
<div class="panel_tab"></div>
</div>
</div>
</div>
<!-- Description -->
<div id="description">
<h3>Description</h3>
<p>Slide Panel is a JQuery plugin that allows elements to expand and collapse creating a sliding panel effect. I know that this is nothing new and there are already a few JQuery panel plugins out there but this one is both highly flexible, has a small footprint and has some unique features.</p>
<h3>Further Developments</h3>
<ul>
<li>Option to slide vertically as well as horizontally</li>
<li>Destroy method to unbind events and remove the panel from the dom</li>
</ul>
<h3>Options</h3>
<ul>
<li><b>handle</b>: Selector for the element that is visible at collapsed state, default is set to ".panel_tab"</li>
<li><b>content</b>: Selector for the element that is visible at open state ".panel_content"</li>
<li><b>opened</b>: Inital panel state is open, default is set to false</li>
<li><b>hidden</b>: Inital panel state is hidden, default is set to false</li>
<li><b>direction</b>: If closing on "mouseleave" constrain the direction that closes the panel, can be "right", "left" or "both", default is set to "both"</li>
<li><b>openedSize</b>: Width of panel at its open state, default is set to 250</li>
<li><b>offset</b>: Width for the handle at its closed state, default is set to 35</li>
<li><b>closedSize</b>: Width of the panel at its closed state, default is set to 0</li>
<li><b>animTime</b>: Time it takes to open or close, default is set to 500</li>
<li><b>openEvent</b>: Event to open the panel, default is set to "mouseenter"</li>
<li><b>closeEvent</b>: Event to close the panel, default is set to "mouseleave"</li>
<li><b>toggleEvent</b>: Event to toggle the panel, default is set to ""</li>
<li><b>openSelector</b>: Selector for the element to attach the open event to, default is set to ""</li>
<li><b>closeSelector</b>: Selector for the element to attach the close event to, default is set to ""</li>
<li><b>toggleSelector</b>: Selector for the element to attach the toggle event to, default is set to ""</li>
</ul>
<h3>Methods</h3>
<ul>
<li><b>open</b>: Open the panel</li>
<li><b>close</b>: Close the panel</li>
<li><b>forceClose</b>: Force close the panel no matter what</li>
<li><b>toggle</b>: Toggle the panel</li>
<li><b>hide</b>: Hide the panel</li>
</ul>
</div>
</div>
<div id="menu">
Version Beta 0.0.1<br/>
Updated November 10th, 2011<br/>
Have questions or find a bug? Open an Issue on <a href="https://github.com/robincwillis/SlidePanel/issues" target="_blank">GitHub</a><br/>
<a class="button" href="src/jquery.slidePanel.0.0.1.js" target="_blank">Download</a>
<!-- Download Link -->
<a class="button" href="example/index.html" target="_blank">Demo</a>
<!-- Demo Link -->
<a class="button" href="https://github.com/robincwillis/SlidePanel/" target="_blank">Source</a>
<!-- Contact Link -->
</div>
<div style="clear:both"></div>
<!-- Pre-HTML -->
<div id="code_html">
<h2>HTML</h2>
<pre>
<div id="slide_panel" class="panel right">
<div class="panel_content"></div>
<div class="panel_tab"></div>
</div></pre>
</div>
<!-- Pre-CSS -->
<div id="css_html">
<h2>CSS</h2>
<pre>
.left{float:left;}
.right{float: right;}
.panel{
height:100%;
display:block;
overflow:hidden;
}
.panel_tab{
height:100%;
overflow: hidden;
}</pre>
</div>
<!-- Pre-Jquery -->
<div id="code_jquery">
<h2>JAVASCRIPT</h2>
<pre>
$("#a_panel").panel({
handle:'#slide_panel > .panel_tab',
content:'#slide_panel > .panel_content',
opened:true,
direction : "both",
openedSize : 180,
openEvent : 'mouseenter',
closeEvent : 'mouseleave',
openSelector : '#slide_panel',
closeSelector : '#slide_panel',
});</pre>
</div>
<div id="footer">
Check out my other JQuery Plugins and Projects at <a href="http://code.robincwillis.com" target="_blank">code.robincwillis.com</a>
or get in touch with me on <a href="https://twitter.com/#!/robincwillis" target="_blank">Twitter</a>.
</div>
</div>
</body>
</html>