zurb-foundation 3.0.5 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/config/assets.yml +58 -0
- data/foundation.gemspec +1 -0
- data/index.html +1 -1
- data/lib/foundation/version.rb +1 -1
- data/lib/zurb-foundation.rb +4 -5
- data/public/assets/foundation.js +11 -0
- data/public/assets/jquery.js +23 -0
- data/stylesheets/foundation/_mixins.scss +1 -1
- data/stylesheets/foundation/_semantic-grid.scss +9 -5
- data/stylesheets/foundation/_settings.scss +6 -0
- data/stylesheets/foundation/buttons.scss +35 -8
- data/stylesheets/foundation/forms.scss +3 -3
- data/stylesheets/foundation/globals.scss +1 -3
- data/stylesheets/foundation/grid.scss +10 -7
- data/stylesheets/foundation/navbar.scss +1 -1
- data/stylesheets/foundation/reveal.scss +1 -1
- data/stylesheets/foundation/typography.scss +25 -11
- data/stylesheets/foundation/ui.scss +48 -4
- data/templates/project/index.html +23 -9
- data/templates/project/manifest.rb +32 -20
- data/templates/project/sass/_settings.scss +2 -0
- data/templates/project/sass/app.scss +1 -0
- data/templates/project/sass/{foundation-style → foundation}/buttons.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/forms.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/globals.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/grid.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/navbar.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/orbit.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/reveal.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/tabs.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/typography.scss +0 -0
- data/templates/project/sass/{foundation-style → foundation}/ui.scss +0 -0
- data/test.html +152 -686
- data/test2.html +320 -0
- data/vendor/assets/javascripts/foundation/app.js +19 -123
- data/vendor/assets/javascripts/foundation/index.js +11 -5
- data/vendor/assets/javascripts/foundation/jquery.foundation.accordion.js +15 -0
- data/vendor/assets/javascripts/foundation/jquery.foundation.alerts.js +19 -0
- data/vendor/assets/javascripts/foundation/jquery.foundation.buttons.js +45 -0
- data/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +481 -0
- data/vendor/assets/javascripts/foundation/jquery.foundation.navigation.js +30 -0
- data/vendor/assets/javascripts/foundation/{jquery.orbit-1.4.0.js → jquery.foundation.orbit.js} +3 -3
- data/vendor/assets/javascripts/foundation/jquery.foundation.reveal.js +773 -0
- data/vendor/assets/javascripts/foundation/jquery.foundation.tabs.js +36 -0
- data/vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js +183 -0
- data/vendor/assets/javascripts/foundation/jquery.js +9404 -0
- data/vendor/assets/javascripts/foundation/jquery.placeholder.js +157 -0
- data/vendor/assets/javascripts/foundation/modernizr.foundation.js +3 -3
- metadata +45 -21
- data/templates/project/stylesheets/app.css +0 -0
- data/vendor/assets/javascripts/foundation/jquery.customforms.js +0 -258
- data/vendor/assets/javascripts/foundation/jquery.min.js +0 -4
- data/vendor/assets/javascripts/foundation/jquery.placeholder.min.js +0 -2
- data/vendor/assets/javascripts/foundation/jquery.reveal.js +0 -178
- data/vendor/assets/javascripts/foundation/jquery.tooltips.js +0 -166
data/test2.html
ADDED
@@ -0,0 +1,320 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
4
|
+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
5
|
+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
|
6
|
+
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
|
7
|
+
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
|
8
|
+
<head>
|
9
|
+
<meta charset="utf-8" />
|
10
|
+
|
11
|
+
<!-- Set the viewport width to device width for mobile -->
|
12
|
+
<meta name="viewport" content="width=device-width" />
|
13
|
+
|
14
|
+
<title>Welcome to Foundation</title>
|
15
|
+
|
16
|
+
<!-- Included CSS Files -->
|
17
|
+
<link rel="stylesheet" href="marketing/stylesheets/index.css">
|
18
|
+
|
19
|
+
|
20
|
+
<script src="vendor/assets/javascripts/foundation/modernizr.foundation.js"></script>
|
21
|
+
|
22
|
+
<!-- IE Fix for HTML5 Tags -->
|
23
|
+
<!--[if lt IE 9]>
|
24
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
25
|
+
<![endif]-->
|
26
|
+
<style type="text/css">
|
27
|
+
|
28
|
+
.display-grid .row { background: #eee; margin-bottom: 8px; }
|
29
|
+
.display-grid .column, .display-grid .columns { background: #ddd; }
|
30
|
+
|
31
|
+
</style>
|
32
|
+
</head>
|
33
|
+
<body>
|
34
|
+
<div class="row">
|
35
|
+
<div class="twelve columns">
|
36
|
+
<h4>Reveal</h4>
|
37
|
+
<a href="#" data-reveal-id="myModal" class="button">Open Modal</a>
|
38
|
+
<div id="myModal" class="reveal-modal">
|
39
|
+
<h2>Awesome. I have it.</h2>
|
40
|
+
<p class="lead">Your couch. It's mine.</p>
|
41
|
+
<p>I'm a cool paragraph that lives inside of an even cooler modal. Wins</p>
|
42
|
+
<a class="close-reveal-modal">×</a>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div class="row">
|
48
|
+
<div class="six columns">
|
49
|
+
<h5>Orbit Slider Demo</h5>
|
50
|
+
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
51
|
+
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
52
|
+
</div>
|
53
|
+
<div class="six columns">
|
54
|
+
<div id="featured">
|
55
|
+
<img src="http://placehold.it/500x300&text=image1" />
|
56
|
+
<img src="http://placehold.it/500x300&text=image2" />
|
57
|
+
<img src="http://placehold.it/500x300&text=image3" />
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="row">
|
63
|
+
<div class="eight columns">
|
64
|
+
<h4>Visibility Classes</h4>
|
65
|
+
<p>Foundation 3 allows you to easily turn elements on and off based on certain device criteria, like screen size, touch, or orientation.</p>
|
66
|
+
|
67
|
+
<h5>Screen Size</h5>
|
68
|
+
<p>The following text should describe the device you're using:
|
69
|
+
<strong class="show-for-xlarge">You are on a very large screen.</strong>
|
70
|
+
<strong class="show-for-large">You are on a large screen.</strong>
|
71
|
+
<strong class="show-for-large-up">You are on a large or very large screen.</strong>
|
72
|
+
<strong class="show-for-medium">You are on a medium screen.</strong>
|
73
|
+
<strong class="show-for-medium-down">You are on a medium or small screen.</strong>
|
74
|
+
<strong class="show-for-small">You are on a small screen, like a smartphone.</strong>
|
75
|
+
</p>
|
76
|
+
|
77
|
+
<p>This example uses the opposite rules, so the following text should inversely describe the device you're using:
|
78
|
+
<strong class="hide-for-xlarge">You are not on a very large screen.</strong>
|
79
|
+
<strong class="hide-for-large">You are not on a large screen.</strong>
|
80
|
+
<strong class="hide-for-large-up">You are not on a large or very large screen.</strong>
|
81
|
+
<strong class="hide-for-medium-down">You are not on a medium or small screen.</strong>
|
82
|
+
<strong class="hide-for-medium">You are not on a medium screen.</strong>
|
83
|
+
<strong class="hide-for-small">You are not on a small screen.</strong>
|
84
|
+
</p>
|
85
|
+
|
86
|
+
<h5>Orientation Detection</h5>
|
87
|
+
<p>The following text should describe the device you're using:
|
88
|
+
<strong class="show-for-landscape">You are in landscape orientation.</strong>
|
89
|
+
<strong class="show-for-portrait">You are in portrait orientation.</strong>
|
90
|
+
</p>
|
91
|
+
|
92
|
+
<h5>Touch Detection</h5>
|
93
|
+
<p>The following text should describe the device you're using:
|
94
|
+
<strong class="show-for-touch">You are on a touch-enabled device.</strong>
|
95
|
+
<strong class="hide-for-touch">You are not on a touch-enabled device.</strong>
|
96
|
+
</p>
|
97
|
+
|
98
|
+
<ul class="radius button-group">
|
99
|
+
<li>
|
100
|
+
<input type="submit" value="Save" class="medium secondary button" />
|
101
|
+
</li>
|
102
|
+
<li>
|
103
|
+
<input type="submit" value="Publish" class="medium success button" />
|
104
|
+
</li>
|
105
|
+
</ul>
|
106
|
+
|
107
|
+
<p>
|
108
|
+
<input type="submit" value="Publish" class="medium success button" />
|
109
|
+
<a href="" class="success button">Publish</a>
|
110
|
+
</p>
|
111
|
+
|
112
|
+
<p>
|
113
|
+
<a href="" class="disabled button">Publish</a> <a href="" class="disabled success button">Publish</a> <a href="" class="disabled alert button">Publish</a> <a href="" class="disabled secondary button">Publish</a>
|
114
|
+
</p>
|
115
|
+
|
116
|
+
<ul class="radius button-group">
|
117
|
+
<li>
|
118
|
+
<a href="" class="button">Save</a>
|
119
|
+
</li>
|
120
|
+
<li>
|
121
|
+
<a href="" class="button">Publish</a>
|
122
|
+
</li>
|
123
|
+
<li>
|
124
|
+
<div href="#" class="button split dropdown">
|
125
|
+
<a href="#">Split Button</a>
|
126
|
+
<span></span>
|
127
|
+
<ul>
|
128
|
+
<li><a href="#">Dropdown Item</a></li>
|
129
|
+
<li><a href="#">Another Dropdown Item</a></li>
|
130
|
+
<li class="divider"></li>
|
131
|
+
<li><a href="#">Last Item</a></li>
|
132
|
+
</ul>
|
133
|
+
</div>
|
134
|
+
</li>
|
135
|
+
<li>
|
136
|
+
<div href="#" class="button dropdown">
|
137
|
+
Dropdown Button
|
138
|
+
<ul>
|
139
|
+
<li><a href="#">Dropdown Item</a></li>
|
140
|
+
<li><a href="#">Another Dropdown Item</a></li>
|
141
|
+
<li class="divider"></li>
|
142
|
+
<li><a href="#">Last Item</a></li>
|
143
|
+
</ul>
|
144
|
+
</div>
|
145
|
+
</li>
|
146
|
+
</ul>
|
147
|
+
|
148
|
+
<p>
|
149
|
+
<div href="#" class="large secondary button split dropdown">
|
150
|
+
<a href="#">Split Button</a>
|
151
|
+
<span></span>
|
152
|
+
<ul>
|
153
|
+
<li><a href="#">Dropdown Item</a></li>
|
154
|
+
<li><a href="#">Another Dropdown Item</a></li>
|
155
|
+
<li class="divider"></li>
|
156
|
+
<li><a href="#">Last Item</a></li>
|
157
|
+
</ul>
|
158
|
+
</div>
|
159
|
+
</p>
|
160
|
+
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div class="four columns">
|
164
|
+
<div class="row">
|
165
|
+
<div class="six columns">
|
166
|
+
<img src="http://placehold.it/200x200" />
|
167
|
+
</div>
|
168
|
+
<div class="six columns">
|
169
|
+
<img src="http://placehold.it/200x200" />
|
170
|
+
</div>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<ul class="block-grid two-up">
|
174
|
+
<li><img src="http://placehold.it/200x200" /></li>
|
175
|
+
<li><img src="http://placehold.it/200x200" /></li>
|
176
|
+
</ul>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div class="row">
|
181
|
+
<div class="twelve columns">
|
182
|
+
<h4>Navigation</h4>
|
183
|
+
<ul class="nav-bar">
|
184
|
+
<li class="active"><a href="#">Nav Item 1</a></li>
|
185
|
+
<li class="has-flyout">
|
186
|
+
<a href="#">Nav Item 2</a>
|
187
|
+
<a href="#" class="flyout-toggle"><span> </span></a>
|
188
|
+
<ul class="flyout">
|
189
|
+
<li><a href="#">Sub Nav 1</a></li>
|
190
|
+
<li><a href="#">Sub Nav 2</a></li>
|
191
|
+
<li><a href="#">Sub Nav 3</a></li>
|
192
|
+
</ul>
|
193
|
+
</li>
|
194
|
+
</ul>
|
195
|
+
</div>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<div class="row">
|
199
|
+
<div class="twelve columns">
|
200
|
+
<h4>Tabs</h4>
|
201
|
+
<dl class="tabs">
|
202
|
+
<dd class="active"><a href="#simple1">Simple Tab 1</a></dd>
|
203
|
+
<dd><a href="#simple2">Simple Tab 2</a></dd>
|
204
|
+
<dd><a href="#simple3">Simple Tab 3</a></dd>
|
205
|
+
</dl>
|
206
|
+
|
207
|
+
<ul class="tabs-content">
|
208
|
+
<li class="active" id="simple1Tab">This is simple tab 1's content. Pretty neat, huh?</li>
|
209
|
+
<li id="simple2Tab">This is simple tab 2's content. Now you see it!</li>
|
210
|
+
<li id="simple3Tab">This is simple tab 3's content. It's, you know...okay.</li>
|
211
|
+
</ul>
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div class="row">
|
216
|
+
<div class="twelve columns">
|
217
|
+
<h4>Custom Forms</h4>
|
218
|
+
<form class="custom">
|
219
|
+
<label for="radio1">
|
220
|
+
<input name="customChoice" type="radio" id="radio1"> Radio Button 1
|
221
|
+
</label>
|
222
|
+
|
223
|
+
<label for="radio2">
|
224
|
+
<input name="customChoice" type="radio" id="radio2"> Radio Button 1
|
225
|
+
</label>
|
226
|
+
|
227
|
+
<label for="radio3">
|
228
|
+
<input name="customChoice" type="radio" id="radio3"> Radio Button 1
|
229
|
+
</label>
|
230
|
+
|
231
|
+
<label for="radio4">
|
232
|
+
<input name="customChoice" type="radio" id="radio4" disabled> Radio Button 3
|
233
|
+
</label>
|
234
|
+
|
235
|
+
<label for="myDropdown">Dropdown Label</label>
|
236
|
+
<select id="myDropdown">
|
237
|
+
<option>This is a dropdown</option>
|
238
|
+
<option SELECTED>This is another option</option>
|
239
|
+
<option>Look, a third option</option>
|
240
|
+
</select>
|
241
|
+
|
242
|
+
<label for="customDropdown2">Dropdown Label</label>
|
243
|
+
<select id="customDropdown2">
|
244
|
+
<option>This is a dropdown</option>
|
245
|
+
<option SELECTED>This is another option</option>
|
246
|
+
<option>Look, a third option</option>
|
247
|
+
</select>
|
248
|
+
</form>
|
249
|
+
</div>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div class="row">
|
253
|
+
<div class="twelve columns">
|
254
|
+
<h4>Alerts</h4>
|
255
|
+
<div class="alert-box success">
|
256
|
+
This is an alert box.
|
257
|
+
<a href="" class="close">×</a>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
<div class="alert-box secondary">
|
261
|
+
This is an alert box.
|
262
|
+
<a href="" class="close">×</a>
|
263
|
+
</div>
|
264
|
+
|
265
|
+
<div class="alert-box alert">
|
266
|
+
This is an alert box.
|
267
|
+
<a href="" class="close">×</a>
|
268
|
+
</div>
|
269
|
+
</div>
|
270
|
+
</div>
|
271
|
+
|
272
|
+
<!-- Included JS Files -->
|
273
|
+
<script src="vendor/assets/javascripts/foundation/jquery.js"></script>
|
274
|
+
<script src="vendor/assets/javascripts/foundation/jquery.placeholder.js"></script>
|
275
|
+
|
276
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.alerts.js"></script>
|
277
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.accordion.js"></script>
|
278
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.buttons.js"></script>
|
279
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js"></script>
|
280
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.forms.js"></script>
|
281
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.tabs.js"></script>
|
282
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.navigation.js"></script>
|
283
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.reveal.js"></script>
|
284
|
+
<script src="vendor/assets/javascripts/foundation/jquery.foundation.orbit.js"></script>
|
285
|
+
<script src="vendor/assets/javascripts/foundation/app.js"></script>
|
286
|
+
|
287
|
+
<script>
|
288
|
+
$(window).load(function() {
|
289
|
+
$('#orbitTest').orbit({
|
290
|
+
fluid: '16x9'
|
291
|
+
});
|
292
|
+
});
|
293
|
+
|
294
|
+
$('#testModal').bind('reveal:open reveal:opened reveal:close reveal:closed', function (event) {
|
295
|
+
console.log(event);
|
296
|
+
});
|
297
|
+
|
298
|
+
$('#fireReveal').click(function (event) {
|
299
|
+
event.preventDefault();
|
300
|
+
$('#testModal').reveal();
|
301
|
+
});
|
302
|
+
|
303
|
+
$('#fireRevealFade').click(function (event) {
|
304
|
+
event.preventDefault();
|
305
|
+
$('#testModal').reveal({animation: 'fade'});
|
306
|
+
});
|
307
|
+
|
308
|
+
$('#fireRevealNone').click(function (event) {
|
309
|
+
event.preventDefault();
|
310
|
+
$('#testModal').reveal({animation: 'none'});
|
311
|
+
});
|
312
|
+
|
313
|
+
|
314
|
+
$(window).load(function() {
|
315
|
+
$('#featured').orbit();
|
316
|
+
});
|
317
|
+
|
318
|
+
</script>
|
319
|
+
</body>
|
320
|
+
</html>
|
@@ -1,125 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
//
|
16
|
-
$
|
17
|
-
$
|
18
|
-
|
19
|
-
//Show Tab Content
|
20
|
-
$(contentLocation).closest('.tabs-content').children('li').removeClass('active').hide();
|
21
|
-
$(contentLocation).css('display', 'block').addClass('active');
|
22
|
-
}
|
23
|
-
|
24
|
-
$('dl.tabs dd a').on('click.fndtn', function (event) {
|
25
|
-
activateTab($(this).parent('dd'));
|
1
|
+
(function($){
|
2
|
+
|
3
|
+
$(function(){
|
4
|
+
$(document).foundationAlerts();
|
5
|
+
$(document).foundationButtons();
|
6
|
+
$(document).foundationAccordion();
|
7
|
+
$(document).foundationNavigation();
|
8
|
+
$(document).foundationCustomForms();
|
9
|
+
$(document).foundationTabs({callback:$.foundation.customForms.appendCustomMarkup});
|
10
|
+
|
11
|
+
$(document).tooltips();
|
12
|
+
$('input, textarea').placeholder();
|
13
|
+
|
14
|
+
// UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE8 SUPPORT AND ARE USING .block-grids
|
15
|
+
// $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'});
|
16
|
+
// $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'});
|
17
|
+
// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'});
|
18
|
+
// $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'});
|
26
19
|
});
|
27
|
-
|
28
|
-
if (window.location.hash) {
|
29
|
-
activateTab($('a[href="' + window.location.hash + '"]').parent('dd'));
|
30
|
-
$.foundation.customForms.appendCustomMarkup();
|
31
|
-
}
|
32
|
-
|
33
|
-
/* ALERT BOXES ------------ */
|
34
|
-
$(".alert-box").delegate("a.close", "click", function(event) {
|
35
|
-
event.preventDefault();
|
36
|
-
$(this).closest(".alert-box").fadeOut(function(event){
|
37
|
-
$(this).remove();
|
38
|
-
});
|
39
|
-
});
|
40
|
-
|
41
|
-
/* PLACEHOLDER FOR FORMS ------------- */
|
42
|
-
/* Remove this and jquery.placeholder.min.js if you don't need :) */
|
43
|
-
$('input, textarea').placeholder();
|
44
|
-
|
45
|
-
/* TOOLTIPS ------------ */
|
46
|
-
$(this).tooltips();
|
47
|
-
|
48
|
-
/* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */
|
49
|
-
// $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'});
|
50
|
-
// $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'});
|
51
|
-
// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'});
|
52
|
-
// $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'});
|
53
|
-
|
54
|
-
|
55
|
-
/* DROPDOWN NAV ------------- */
|
56
|
-
|
57
|
-
var lockNavBar = false;
|
58
|
-
/* Windows Phone, sadly, does not register touch events :( */
|
59
|
-
if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) {
|
60
|
-
$('.nav-bar a.flyout-toggle').on('click.fndtn touchstart.fndtn', function(e) {
|
61
|
-
e.preventDefault();
|
62
|
-
var flyout = $(this).siblings('.flyout').first();
|
63
|
-
if (lockNavBar === false) {
|
64
|
-
$('.nav-bar .flyout').not(flyout).slideUp(500);
|
65
|
-
flyout.slideToggle(500, function(){
|
66
|
-
lockNavBar = false;
|
67
|
-
});
|
68
|
-
}
|
69
|
-
lockNavBar = true;
|
70
|
-
});
|
71
|
-
$('.nav-bar>li.has-flyout').addClass('is-touch');
|
72
|
-
} else {
|
73
|
-
$('.nav-bar>li.has-flyout').hover(function() {
|
74
|
-
$(this).children('.flyout').show();
|
75
|
-
}, function() {
|
76
|
-
$(this).children('.flyout').hide();
|
77
|
-
});
|
78
|
-
}
|
79
|
-
|
80
|
-
/* DISABLED BUTTONS ------------- */
|
81
|
-
/* Gives elements with a class of 'disabled' a return: false; */
|
82
|
-
$('.button.disabled').on('click.fndtn', function (event) {
|
83
|
-
event.preventDefault();
|
84
|
-
});
|
85
|
-
|
86
|
-
|
87
|
-
/* SPLIT BUTTONS/DROPDOWNS */
|
88
|
-
$('.button.dropdown > ul').addClass('no-hover');
|
89
|
-
|
90
|
-
$('.button.dropdown').on('click.fndtn touchstart.fndtn', function (e) {
|
91
|
-
e.stopPropagation();
|
92
|
-
});
|
93
|
-
$('.button.dropdown.split span').on('click.fndtn touchstart.fndtn', function (e) {
|
94
|
-
e.preventDefault();
|
95
|
-
$('.button.dropdown').not($(this).parent()).children('ul').removeClass('show-dropdown');
|
96
|
-
$(this).siblings('ul').toggleClass('show-dropdown');
|
97
|
-
});
|
98
|
-
$('.button.dropdown').not('.split').on('click.fndtn touchstart.fndtn', function (e) {
|
99
|
-
$('.button.dropdown').not(this).children('ul').removeClass('show-dropdown');
|
100
|
-
$(this).children('ul').toggleClass('show-dropdown');
|
101
|
-
});
|
102
|
-
$('body, html').on('click.fndtn touchstart.fndtn', function () {
|
103
|
-
$('.button.dropdown ul').removeClass('show-dropdown');
|
104
|
-
});
|
105
|
-
|
106
|
-
// Positioning the Flyout List
|
107
|
-
var normalButtonHeight = $('.button.dropdown:not(.large):not(.small):not(.tiny)').outerHeight() - 1,
|
108
|
-
largeButtonHeight = $('.button.large.dropdown').outerHeight() - 1,
|
109
|
-
smallButtonHeight = $('.button.small.dropdown').outerHeight() - 1,
|
110
|
-
tinyButtonHeight = $('.button.tiny.dropdown').outerHeight() - 1;
|
111
|
-
|
112
|
-
$('.button.dropdown:not(.large):not(.small):not(.tiny) > ul').css('top', normalButtonHeight);
|
113
|
-
$('.button.dropdown.large > ul').css('top', largeButtonHeight);
|
114
|
-
$('.button.dropdown.small > ul').css('top', smallButtonHeight);
|
115
|
-
$('.button.dropdown.tiny > ul').css('top', tinyButtonHeight);
|
116
20
|
|
117
|
-
|
118
|
-
$('.button.dropdown.up.large > ul').css('top', 'auto').css('bottom', largeButtonHeight - 2);
|
119
|
-
$('.button.dropdown.up.small > ul').css('top', 'auto').css('bottom', smallButtonHeight - 2);
|
120
|
-
$('.button.dropdown.up.tiny > ul').css('top', 'auto').css('bottom', tinyButtonHeight - 2);
|
121
|
-
|
122
|
-
/* CUSTOM FORMS */
|
123
|
-
$.foundation.customForms.appendCustomMarkup();
|
124
|
-
|
125
|
-
});
|
21
|
+
})(jQuery);
|