forked from mrjasonweaver/flexnav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
162 lines (161 loc) · 7.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
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
<!DOCTYPE html><!--[if IE 7]>
<html lang="en" class="ie7 oldie"></html><![endif]--><!--[if IE 8]>
<html lang="en" class="ie8 oldie"></html><![endif]-->
<!-- [if gt IE 8] <!-->
<html lang="en">
<!-- <![endif]-->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FlexNav - Flexible, Device Agnostic Navigation</title>
<link href="css/flexnav.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="css/page.css" media="screen, projection" rel="stylesheet" type="text/css">
<script type="text/javascript" src="//use.typekit.net/qyb8ood.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
</head>
<body class="home-page">
<div class="container">
<header id="site-header">
<hgroup class="site-title">
<h1>FlexNav</h1>
<h2 class="site-title-sub">A jQuery Plugin for Responsive Menus</h2>
</hgroup>
<div class="menu-button">Menu</div>
<nav>
<ul data-breakpoint="800" class="flexnav">
<li><a href="">Item 1</a>
<ul>
<li> <a href="#content">Sub 1 Item 1</a></li>
<li><a href="">Sub 1 Item 2</a></li>
<li><a href="">Sub 1 Item 3</a></li>
<li><a href="">Sub 1 Item 4</a></li>
</ul>
</li>
<li><a href="">Item 2</a>
<ul>
<li><a href="">Sub 1 Item 1</a></li>
<li><a href="">Sub 1 Item 2</a>
<ul>
<li><a href="">Sub 2 Item 1</a></li>
<li><a href="">Sub 2 Item 2</a></li>
<li><a href="">Sub 2 Item 3</a></li>
</ul>
</li>
<li><a href="">Sub 1 Item 3</a>
<ul>
<li><a href="">Sub 2 Item 1</a></li>
<li><a href="">Sub 2 Item 2</a>
<ul>
<li><a href="">Sub 3 Item 1</a></li>
<li><a href="">Sub 3 Item 2</a></li>
<li><a href="">Sub 3 Item 3</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="">Item 3</a>
<ul>
<li><a href="">Sub 1 Item 1</a></li>
<li><a href="">Sub 1 Item 2</a></li>
<li><a href="">Sub 1 Item 3</a></li>
</ul>
</li>
<li><a href="">Item 4</a>
<ul>
<li><a href="">Sub 1 Item 1</a></li>
<li><a href="">Sub 1 Item 2</a></li>
<li><a href="">Sub 1 Item 3</a></li>
</ul>
</li>
<li><a href="">Item 5</a>
<ul>
<li><a href="">Sub 1 Item 1</a></li>
<li><a href="">Sub 1 Item 2</a></li>
<li><a href="">Sub 1 Item 3</a></li>
</ul>
</li>
</ul>
</nav>
</header>
<section id="content" role="main">
<article>
<div class="article-wrap">
<div class="block">
<h2>A Device-Agnostic Approach to Complex Site Navigation</h2>
<p>The mock navigation you see above is a mobile-first example of using media queries and javascript to make a decent site menu with drop downs. Special attention is paid to touch screens using touch events with tap targets (the key feature of FlexNav). This is something I use to test different navigation techniques and may change as I iterate over different solutions to the problem. Basically I want a simple model to build upon when working on sites from scratch.</p>
<p>Want a FlexNav for a one page site with anchors to different sections of the page? Check out the <a href="http://jasonweaver.name/lab/flexiblenavigation/single-page-pattern.html">single page pattern demo.</a></p>
</div>
<div class="block">
<h2>Usage</h2>
<p>Start with a simple unordered list, adding in the class and data attributes:<code><ul class="flexnav" data-breakpoint="800"> <li>...</li> </ul></code></p>
<p>Add the small screen menu button somewhere outside your navigation markup:<code><div class="menu-button">Menu</div></code></p>
<p>Add flexnav.css to the head of your document:<code><link href="css/flexnav.css" rel="stylesheet" type="text/css" /></code></p>
<p>Add jquery.flexnav.min.js before the closing body tag:<code><script type="text/javascript" src="js/jquery.flexnav.min.js"></script></code></p>
<p>Initialize FlexNav right before your closing body tag:<code>$(".flexnav").flexNav();</code></p>
<p>you can change the default speed too:<code>$(".flexnav").flexNav({ 'animationSpeed' : 'fast' });</code></p>
<h2>Options</h2>
<p><code>
'animationSpeed' : '250', <span> // default drop animation speed</span> <br>
'transitionOpacity': true, <span> // default opacity animation</span> <br>
'buttonSelector': '.menu-button', <span> // default menu button class</span> <br>
'hoverIntent': false, <span> // Use with hoverIntent plugin</span> <br>
'hoverIntentTimeout': 150 <span> // hoverIntent default timeout</span> <br>
</code></p>
</div>
</div>
</article>
<article>
<div class="article-wrap">
<div class="block"><img src="http://jasonweaver.name/img/devices.png" alt="devices" class="img-devices"></div>
<div class="block">
<h2>Get FlexNav v1.0.1</h2>
<p><a href="https://github.com/indyplanets/flexnav" class="callout">Download on GitHub →</a></p>
</div>
<div class="block">
<h2>Features</h2>
<ul>
<li>Multiple nested sub menus</li>
<li>Tap targets to reveal sub menus for touch screens</li>
<li>Hover reveal for desktop</li>
<li>Keyboard tab input accessibility</li>
<li>Fallback support for no js</li>
<li>Multiple Flexnavs on one page</li>
</ul>
</div>
<div class="block">
<h2>Browser Support</h2>
<ul>
<li>IE7-10</li>
<li>Latest Safari</li>
<li>Latest Chrome</li>
<li>Latest FireFox</li>
<li>Android 2.2 to Latest</li>
<li>Mobile Safari</li>
</ul>
</div>
</div>
</article>
</section>
</div>
<footer id="site-footer">
<div class="container">
<ul>
<li>Code by <a href="http://jasonweaver.name">Jason Weaver</a></li>
<li><a href="mailto:[email protected]">Contact Me</a></li>
</ul>
</div>
</footer>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript">
//$.noConflict();
</script>
<script src="js/jquery.flexnav.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$(".flexnav").flexNav();
});
</script>
</body>
</html>