-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathindex.html
85 lines (73 loc) · 2.36 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SidebarJS</title>
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" rel="stylesheet" />
<link rel="stylesheet" href="css/lib/fontello.css" />
<link rel="stylesheet" href="css/lib/normalize.css" />
<link rel="stylesheet" href="css/index.css" />
<link rel="stylesheet" href="css/sidebar.css" />
<!--[if lt IE 9]>
<script src="js/lib/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper jsc-sidebar-content jsc-sidebar-pulled">
<nav>
<a href="#" class="icon-menu link-menu jsc-sidebar-trigger"></a>
</nav>
<section class="main-content">
<div class="main-content-header">
<h1 class="headline"><span class="headline-main">Sidebar</span>JS</h1>
<p class="version">v 0.2.0</p>
<p>SidebarJS is a jQuery plugin for side navigation.</p>
<ul class="btn-list">
<li><a href="http://github.com/makotot/sidebar" class="btn">View on Github</a></li>
<li><a href="http://github.com/makotot/sidebar/releases/0.2.0" class="btn">Download</a></li>
</ul>
</div>
<div class="main-content-body">
<div class="main-content-body-inner">
<h2>Public API</h2>
<ul>
<li>
<h3>.push()</h3>
<p><a href="#" id="api-push">Open</a> Sidebar content from JavaScript.</p>
</li>
<li>
<h3>.pull()</h3>
<p><a href="#" id="api-pull">Close</a> Sidebar content from JavaScript.</p>
</li>
</ul>
</div>
</div>
</section>
</div>
<nav class="sidebar jsc-sidebar" id="jsi-nav" data-sidebar-options="">
<ul class="sidebar-list">
<li><a href="./" class="current">SidebarJS</a></li>
<li><a href="http://github.com/makotot/sidebar/">View on Github</a></li>
<li><a href="http://github.com/makotot/sidebar/releases">Download</a></li>
</ul>
</nav>
<script src="js/lib/jquery.min.js"></script>
<script src="js/sidebar.js"></script>
<script>
$('#jsi-nav').sidebar({
trigger: '.jsc-sidebar-trigger',
scrollbarDisplay: true,
pullCb: function () { console.log('pull'); },
pushCb: function () { console.log('push'); }
});
$('#api-push').on('click', function (e) {
e.preventDefault();
$('#jsi-nav').data('sidebar').push();
});
$('#api-pull').on('click', function (e) {
e.preventDefault();
$('#jsi-nav').data('sidebar').pull();
});
</script>
</body>
</html>