forked from arielsalminen/TinyNav.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
48 lines (38 loc) · 1.11 KB
/
demo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>TinyNav.js · Convert navigation to a tiny select box on small screen</title>
<style>
/* styles for desktop */
.tinynav { display: none }
#nav .selected a { color: red }
/* styles for mobile */
@media screen and (max-width: 600px) {
.tinynav { display: block }
#nav { display: none }
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="tinynav.min.js"></script>
<script>
$(function () {
// TinyNav.js
$('#nav').tinyNav({
active: 'selected'
});
});
</script>
</head>
<body>
<h1>TinyNav.js</h1>
<ul id="nav">
<li><a href="http://google.com">Google</a></li>
<li class="selected"><a href="demo.html">Demo page</a></li>
<li><a href="http://bing.com">Bing</a></li>
<li><a href="http://yahoo.com">Yahoo</a></li>
</ul>
<p><a href="http://tinynav.viljamis.com/">See the documentation</a></p>
</body>
</html>