aboutsummaryrefslogtreecommitdiff
path: root/jquery_drawer/sample.html
blob: df92610bff8a8fcae08bcdd4d9a82d7286814a2e (plain)
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="content-type"        content="text/html; charset=UTF-8" />
<meta http-equiv="content-style-type"  content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<title>jQuery.drawer</title>
<link href="drw/styles.css" rel="stylesheet" media="all" />
<script src="drw/jquery.js" type="text/javascript"></script>
<script src="drw/scripts.js" type="text/javascript"></script>
<style type="text/css">
body {
	font-family    : "Lucida Grande", "Arial", sans-serif;
	background     : #222222;
	padding        : 20px 0 0 0;
	margin         : 0;
}

div#content {
	color          : #ffffff;
	background     : #000000;
}

div#info {
	padding        : 0 30px 30px 30px;
}

div#info h1 {
	font-size      : 36px;
	font-weight    : bold;
	padding        : 30px 0 0 0;
	margin         : 0;
}

div#info h2 {
	font-size      : 20px;
	font-weight    : bold;
	border-top     : 1px solid #111111;
	padding        : 30px 0 0 0;
	margin         : 30px 0 0 0;
}

div#info p {
	font-size      : 12px;
	line-height    : 1.6;
	padding        : 10px 0 0 0;
	margin         : 0;
}

div#info a {
	color          : #ffffff;
}

div#info pre {
	font-size      : 11px;
	font-family    : "Courier New", monospace;
	line-height    : 1.4;
	color          : #99ff99;
	background     : #222222;
	padding        : 10px;
	margin         : 10px 0;
}

div#info em {
	font-style     : normal;
	color          : #ff0099;
}

div.sample p {
	font-size      : 24px;
	font-weight    : bold;
	line-height    : 1.6;
	color          : #ffff00;
	padding        : 20px;
	margin         : 0;
}
</style>
</head>
<body>



<!--============= DRAWER ============-->
<ul id="drw_tabs">
	<li><a href="#hello" rel="drw">Hello</a></li>
	<li><a href="#sample_icon" rel="drw">Icon View</a></li>
	<li><a href="#sample_list" rel="drw">List View</a></li>
	<li><a href="sample_ajax.html" rel="drw">Ajax</a></li>
	<li><a href="http://www.google.com/" target="_blank">No Drawer</a></li>
</ul>
<!--============ /DRAWER ============-->



<div id="content">
<div id="drw"></div>
<div id="info">
<div>
	<h1>jQuery.drawer</h1>
	<p>
		jQuery.drawer is a <a href="http://jquery.com/">jQuery</a>-based, drawer style navigation.<br />
		Look at how the header navigation of this page works
	</p>
</div>
	
	

<div>
	<h2>Download</h2>
	<p>
		<a href="http://src.metatype.jp/jquery_drawer_1.00.zip">jQuery.drawer v1.00</a><br />
		Everyone can use it under the MIT-style license.
	</p>
</div>
	
	

<div>
	<h2>Settings</h2>
	<p>
		Load dependencies in the header element of HTML.
	</p>
	<pre>&lt;link href="drw/styles.css" rel="stylesheet" media="all" /&gt;
&lt;script src="drw/jquery.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="drw/scripts.js" type="text/javascript"&gt;&lt;/script&gt;</pre>
	<p>
		Set the code where you want to display jQuery.drawer's tabs.<br />
		A link tag with a rel="<em>drw</em>" attribute activates jQuery.drawer.<br />
		If you need more tabs, add a list item element.<br />
		JavaScript automatically make the width of each tab the equal.<br />
		See a <a href="sample_flexible.html">Flexible Sample</a> when you use it with a flexible layout.
	</p>
	<pre>&lt;ul id="drw_tabs"&gt;
	&lt;li&gt;&lt;a href="#<em>the ID of HTML element</em>" rel="<em>drw</em>"&gt;label of this tab&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#<em>the ID of HTML element</em>" rel="<em>drw</em>"&gt;label of this tab&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#<em>the ID of HTML element</em>" rel="<em>drw</em>"&gt;label of this tab&lt;/a&gt;&lt;/li&gt;
	...
&lt;/ul&gt;</pre>
	<p>
		Set the code where you want to display jQuery.drawer.
	</p>
	<pre>&lt;div id="drw"&gt;&lt;/div&gt;</pre>
</div>



<div>
	<h2>How to use</h2>
	<p>
		Set a "href" attribute of link tag in jQuery.drawer's tabs to <em>the ID of HTML element</em>.<br />
		The HTML element will display in jQuery.drawer.<br />
		<br />
		For example:<br />
		In that case jQuery.drawer display the HTML element of ID "hello".
	</p>
	<pre>&lt;ul id="drw_tabs"&gt;
	&lt;li&gt;&lt;a href="#<em>hello</em>" rel="<em>drw</em>"&gt;Hello&lt;/a&gt;&lt;/li&gt;
	...
&lt;/ul&gt;

...

&lt;div id="<em>hello</em>"&gt;
	&lt;p&gt;Hello jQuery.drawer!&lt;/p&gt;
&lt;/div&gt;</pre>
</div>



<div>
	<h2>Icon &amp; List View</h2>
	<p>
		jQuery.drawer provides 2 content styles in default.<br />
		<br />
		"Icon View" is a item list with icon.<br />
		Use element &lt;ul&gt; with class name "drw_icon_view".<br />
		The format of Icon View:
	</p>
	<pre>&lt;ul class="drw_icon_view"&gt;
	&lt;li&gt;
		&lt;div class="drw_img"&gt;&lt;img src="<em>item's icon</em>" /&gt;&lt;/div&gt;
		&lt;div class="drw_info"&gt;
			&lt;h6&gt;&lt;a href="<em>item's link</em>"&gt;<em>item's title</em>&lt;/a&gt;&lt;/h6&gt;
			&lt;p&gt;<em>item's description</em>&lt;/p&gt;
		&lt;/div&gt;
	&lt;/li&gt;
	...
&lt;/ul&gt;</pre>
	<p>
		"List View" is a simple item list.<br />
		Use element &lt;ul&gt; with class name "drw_list_view".<br />
		The format of List View:
	</p>
	<pre>&lt;ul class="drw_list_view"&gt;
	&lt;li&gt;
		&lt;a href="<em>item's link</em>"&gt;
			&lt;span class="drw_title"&gt;<em>item's title</em>&lt;/span&gt;
			&lt;span class="drw_desc"&gt;<em>item's description</em>&lt;/span&gt;
			&lt;span class="drw_date"&gt;<em>item's date</em>&lt;/span&gt;
		&lt;/a&gt;
	&lt;/li&gt;
	...
&lt;/ul&gt;</pre>
</div>



<div>
	<h2>Ajax</h2>
	<p>
		jQuery.drawer can load source code of external file with Ajax.<br />
		
		Set a "href" attribute of link tag in jQuery.drawer's tabs to <em>the URL of external file</em>.<br />
		The source code of external file will display in jQuery.drawer.<br />
		<br />
		For example:<br />
		In that case jQuery.drawer display source code of "sample_ajax.html".
	</p>
	<pre>&lt;ul id="drw_tabs"&gt;
	&lt;li&gt;&lt;a href="<em>sample_ajax.html</em>" rel="<em>drw</em>"&gt;Hello&lt;/a&gt;&lt;/li&gt;
	...
&lt;/ul&gt;</pre>
</div>



<div>
	<h2>Author</h2>
	<p>
		inamorix@metatype.jp<br />
		Copyright &copy; 2008 <a href="http://metatype.jp/">metatype</a>, All rights reserved.
	</p>
</div>
</div>
</div>



<div id="hello" class="sample">
	<p>Hello jQuery.drawer!</p>
</div>



<ul id="sample_icon" class="drw_icon_view">
	<li>
		<div class="drw_img"><img src="sample.gif" alt="sample" /></div>
		<div class="drw_info">
			<h6><a href="#">item's title</a></h6>
			<p>item's description is here. item's description is here.</p>
		</div>
	</li>
	<li>
		<div class="drw_img"><img src="sample.gif" alt="sample" /></div>
		<div class="drw_info">
			<h6><a href="#">item's title</a></h6>
			<p>item's description is here. item's description is here.</p>
		</div>
	</li>
	<li>
		<div class="drw_img"><img src="sample.gif" alt="sample" /></div>
		<div class="drw_info">
			<h6><a href="#">item's title</a></h6>
			<p>item's description is here. item's description is here.</p>
		</div>
	</li>
	<li>
		<div class="drw_img"><img src="sample.gif" alt="sample" /></div>
		<div class="drw_info">
			<h6><a href="#">item's title</a></h6>
			<p>item's description is here. item's description is here.</p>
		</div>
	</li>
	<li>
		<div class="drw_img"><img src="sample.gif" alt="sample" /></div>
		<div class="drw_info">
			<h6><a href="#">item's title</a></h6>
			<p>item's description is here. item's description is here.</p>
		</div>
	</li>
	<li>
		<div class="drw_img"><img src="sample.gif" alt="sample" /></div>
		<div class="drw_info">
			<h6><a href="#">item's title</a></h6>
			<p>item's description is here. item's description is here.</p>
		</div>
	</li>
</ul>



<ul id="sample_list" class="drw_list_view">
	<li>
		<a href="#">
			<span class="drw_title">item's title</span>
			<span class="drw_desc">item's description is here. item's description is here.</span>
			<span class="drw_date">2008.05.01</span>
		</a>
	</li>
	<li>
		<a href="#">
			<span class="drw_title">item's title</span>
			<span class="drw_desc">item's description is here. item's description is here.</span>
			<span class="drw_date">2008.05.01</span>
		</a>
	</li>
	<li>
		<a href="#">
			<span class="drw_title">item's title</span>
			<span class="drw_desc">item's description is here. item's description is here.</span>
			<span class="drw_date">2008.05.01</span>
		</a>
	</li>
	<li>
		<a href="#">
			<span class="drw_title">item's title</span>
			<span class="drw_desc">item's description is here. item's description is here.</span>
			<span class="drw_date">2008.05.01</span>
		</a>
	</li>
</ul>



</body>
</html>