zurb-foundation 4.0.9 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. data/Gemfile.lock +1 -1
  2. data/README.md +10 -3
  3. data/docs/Gemfile +4 -1
  4. data/docs/Gemfile.lock +1 -1
  5. data/docs/_sidebar-components.html.erb +1 -0
  6. data/docs/_sidebar.html.erb +2 -0
  7. data/docs/components/dropdown.html.erb +3 -3
  8. data/docs/components/global.html.erb +1 -1
  9. data/docs/components/grid.html.erb +4 -4
  10. data/docs/components/joyride.html.erb +4 -1
  11. data/docs/components/kitchen-sink.html.erb +864 -0
  12. data/docs/components/orbit.html.erb +1 -1
  13. data/docs/components/section.html.erb +29 -2
  14. data/docs/components/split-buttons.html.erb +1 -1
  15. data/docs/components/top-bar.html.erb +0 -3
  16. data/docs/css/docs.scss +8 -6
  17. data/docs/layout.html.erb +13 -2
  18. data/docs/rtl.html.erb +53 -0
  19. data/docs/support.html.erb +1 -1
  20. data/js/foundation/foundation.clearing.js +20 -14
  21. data/js/foundation/foundation.dropdown.js +10 -11
  22. data/js/foundation/foundation.forms.js +45 -13
  23. data/js/foundation/foundation.joyride.js +14 -6
  24. data/js/foundation/foundation.js +7 -1
  25. data/js/foundation/foundation.orbit.js +10 -8
  26. data/js/foundation/foundation.reveal.js +1 -1
  27. data/js/foundation/foundation.section.js +23 -7
  28. data/js/foundation/foundation.tooltips.js +7 -3
  29. data/js/foundation/foundation.topbar.js +28 -12
  30. data/lib/foundation/generators/install_generator.rb +1 -1
  31. data/lib/foundation/version.rb +1 -1
  32. data/package.json +7 -1
  33. data/scss/foundation/_foundation-global.scss +3 -3
  34. data/scss/foundation/components/_alert-boxes.scss +4 -4
  35. data/scss/foundation/components/_button-groups.scss +6 -4
  36. data/scss/foundation/components/_buttons.scss +4 -4
  37. data/scss/foundation/components/_clearing.scss +18 -16
  38. data/scss/foundation/components/_custom-forms.scss +8 -8
  39. data/scss/foundation/components/_dropdown-buttons.scss +12 -12
  40. data/scss/foundation/components/_dropdown.scss +5 -6
  41. data/scss/foundation/components/_forms.scss +15 -15
  42. data/scss/foundation/components/_grid.scss +18 -18
  43. data/scss/foundation/components/_inline-lists.scss +8 -3
  44. data/scss/foundation/components/_joyride.scss +8 -8
  45. data/scss/foundation/components/_magellan.scss +3 -2
  46. data/scss/foundation/components/_orbit.scss +24 -16
  47. data/scss/foundation/components/_pricing-tables.scss +1 -1
  48. data/scss/foundation/components/_reveal.scss +2 -2
  49. data/scss/foundation/components/_section.scss +5 -5
  50. data/scss/foundation/components/_split-buttons.scss +18 -18
  51. data/scss/foundation/components/_sub-nav.scss +1 -1
  52. data/scss/foundation/components/_switch.scss +11 -12
  53. data/scss/foundation/components/_tables.scss +1 -1
  54. data/scss/foundation/components/_tooltips.scss +2 -1
  55. data/scss/foundation/components/_top-bar.scss +10 -9
  56. data/templates/project/index.html +2 -2
  57. data/templates/project/scss/_settings.scss +8 -0
  58. metadata +6 -4
@@ -258,7 +258,7 @@ $stack-on-small-margin-bottom: emCalc(20px); // Stack on small does not function
258
258
  orbit_transition_class: 'orbit-transitioning'
259
259
  }", :js %>
260
260
 
261
- <p>You can also use the <code>data-options</code> attribute to pass configuration settings to Orbit. Treat it like a <code>style</code> property:</p>
261
+ <p>Starting in 4.0.7 you can also use the <code>data-options</code> attribute to pass configuration settings to Orbit. Treat it like a <code>style</code> property:</p>
262
262
 
263
263
  <%= code_example '
264
264
  <ul data-orbit data-options="timer_speed:2500; bullets:false;">
@@ -39,7 +39,7 @@
39
39
  </div>
40
40
  </div>
41
41
  <div class="large-9 columns">
42
- <div class="section-container horizontal-nav" data-section="horizontal-nav">
42
+ <div class="section-container horizontal-nav" data-section="horizontal-nav" >
43
43
  <section class="section">
44
44
  <p class="title"><a href="#">Section 1</a></p>
45
45
  <div class="content">
@@ -275,7 +275,7 @@
275
275
  <h6>Deep Linking</h6>
276
276
  <p>Set <code>deep-linking</code> to true to enable deep linking to sections of content. Deep linking allows visitors to visit a predefined URL with a hash that points to a particular section of the content. Deep linking also requires a matching <code>data-slug</code> on the content section that the hash should point to, without the pound (&#35;) sign.</p>
277
277
 
278
- <%= code_example '
278
+ <%= code_example '
279
279
  <div class="section-container auto" data-section data-options="deep_linking: true">
280
280
  <section class="section">
281
281
  <p class="title"><a href="#section1">Section 1</a></p>
@@ -295,6 +295,32 @@
295
295
 
296
296
  <hr>
297
297
 
298
+ <!-- <h3>Building with Mixins</h3>
299
+ <p>If you are keen on SCSS and use it for your Foundation projects, you have access to mixins that will let you create any type of section you want and change it within a media query too! Building a section with our mixins requires a bit of predefined structure, but you can choose the classes or ID's to style them with. Start with some sort of block-level container, we use a <code>&lt;div&gt;</code>. This container needs to have <code>data-section="type-of-section"</code>. The section types are explained above. Inside this you create "sections", which can be an HTML5 <code>section</code> element or a <code>&lt;div class="section"&gt;</code>, that will hold content.<p>
300
+
301
+ <h5>Title and Content Elements</h5>
302
+ <p>Inside of these "sections" you created you'll need to add a title and content. To create the title element, use something like a <code>&lt;p&gt;</code>, <code>&lt;h5&gt;</code>, etc and give it an attribute of <code>data-section-title</code>. After this, you add <code>&lt;div data-section-content&gt;</code> and fill it with your content.</p>
303
+
304
+ <p>Here's an example structure you might use with the section mixin:</p>
305
+
306
+ <%= code_example '
307
+ <div class="your-class-name" data-section="auto"> <!-- Can use "auto", "accordion", "tabs", "vertical-nav", or "horizontal-nav" -->
308
+ <section class="your-section-class" data-section>
309
+ <p class="title"><a href="#section1">Section 1</a></p>
310
+ <div class="content" data-slug="section1">
311
+ <p>Content of section 1.</p>
312
+ </div>
313
+ </section>
314
+ <section class="section">
315
+ <p class="title"><a href="#section2">Section 2</a></p>
316
+ <div class="content" data-slug="section2">
317
+ <p>Content of section 2.</p>
318
+ </div>
319
+ </section>
320
+ </div>', :html %>
321
+
322
+ <hr> -->
323
+
298
324
  <h5>Default SCSS Variables</h5>
299
325
  <%= code_example '
300
326
  /* We use these to set padding and hover factor */
@@ -368,6 +394,7 @@ $section-bottom-margin: emCalc(20px);
368
394
  {
369
395
  deep_linking: false,
370
396
  one_up: true,
397
+ rtl: false,
371
398
  callback: function (){}
372
399
  }", :js %>
373
400
 
@@ -156,7 +156,7 @@ $split-button-pip-left-lrg: emCalc(-9px);
156
156
  <%= code_example '
157
157
  <a href="#" data-dropdown="drop1" class="button dropdown">Dropdown Button <span data-dropdown="drop1"></span></a><br>
158
158
 
159
- <ul id="drop1" class="f-dropdown">
159
+ <ul id="drop1" class="f-dropdown" data-dropdown-content>
160
160
  <li><a href="#">This is a link</a></li>
161
161
  <li><a href="#">This is another</a></li>
162
162
  <li><a href="#">Yet another</a></li>
@@ -76,9 +76,6 @@
76
76
  <div class="row">
77
77
  <div class="large-12 columns">
78
78
 
79
- <p>The topbar is only designed to have one per page, so we can't include a demo on this page due to the fact that we have one on the page already. Take a look at the code we have below and checkout our topbar to get a feel for how it works. The only thing about the one on this page is it doesn't have a dropdown.</p>
80
- <hr>
81
-
82
79
  <h3>Build With HTML Classes</h3>
83
80
  <p>The top bar is a pretty complex piece of magical UI goodness, which makes it really difficult to create a mixin from it. We rely on many presentational classes to accomplish the styles and there's a lot happening in the JS.</p>
84
81
 
data/docs/css/docs.scss CHANGED
@@ -7,6 +7,8 @@
7
7
  /* Coderay styles */
8
8
  .html, .css, .scss, .js { position: relative; }
9
9
 
10
+ ul, ol, dl { list-style-position: inside; }
11
+
10
12
  .CodeRay:before {
11
13
  position: absolute;
12
14
  top: 6px;
@@ -46,7 +48,7 @@ footer.row.full-width {
46
48
 
47
49
  .docs.header { margin-bottom: 10px; }
48
50
  .docs.subheader {
49
- float: left;
51
+ float: $default-float;
50
52
  }
51
53
 
52
54
  .docs.section-container a.active { font-weight: bold; }
@@ -92,7 +94,7 @@ footer.row.full-width {
92
94
 
93
95
  /* Clearing Docs */
94
96
  .clearing-thumbs { list-style: none;
95
- li { float: left; margin-right: 10px; }
97
+ li { float: $default-float; margin-#{$opposite-direction}: 10px; }
96
98
  }
97
99
 
98
100
  /* Forms Docs */
@@ -152,8 +154,8 @@ input[type="text"].attached-input {
152
154
 
153
155
  /* Grid Docs */
154
156
  #masthead { @include grid-row; @include panel;
155
- & > hgroup { @include grid-column(4, $float:left); }
156
- & > section { @include grid-column(8, $float:left); }
157
+ & > hgroup { @include grid-column(4, $float:$default-float); }
158
+ & > section { @include grid-column(8, $float:$default-float); }
157
159
  }
158
160
 
159
161
  /* Switch Docs */
@@ -179,10 +181,10 @@ input[type="text"].attached-input {
179
181
  }
180
182
 
181
183
  @media only screen and (min-width: 800px) {
182
- .docs.header { float: left; }
184
+ .docs.header { float: $default-float; }
183
185
 
184
186
  .docs.subheader {
185
187
  margin-top: 38px;
186
- float: right;
188
+ float: $opposite-direction;
187
189
  }
188
190
  }
data/docs/layout.html.erb CHANGED
@@ -71,7 +71,7 @@
71
71
  <div id="copyright">
72
72
  <div class="row full-width">
73
73
  <div class="large-4 columns">
74
- <p>Site content &copy; 2013 ZURB, inc.</p>
74
+ <p>Site content &copy; <%= Time.now.year %> ZURB, inc.</p>
75
75
  </div>
76
76
  <div class="large-8 columns">
77
77
  <ul class="inline-list right">
@@ -109,7 +109,18 @@
109
109
  </script>
110
110
  <script src="<%= asset_path %>/docs.js"></script>
111
111
  <script>
112
- $(document).foundation();
112
+ $(document)
113
+ <% if @joyride %>
114
+ .foundation()
115
+ .foundation('joyride', 'start');
116
+ <% else %>
117
+ .foundation();
118
+ <% end %>
119
+
120
+ // For Kitchen Sink Page
121
+ $('#start-jr').on('click', function() {
122
+ $(document).foundation('joyride','start');
123
+ });
113
124
  </script>
114
125
  </body>
115
126
  </html>
data/docs/rtl.html.erb ADDED
@@ -0,0 +1,53 @@
1
+ <% @side_nav = "using" %>
2
+ <div class="row">
3
+ <div class="large-9 push-3 columns">
4
+
5
+ <% @page_title = "Right-to-Left Support" %>
6
+ <div class="row">
7
+ <div class="large-12 columns">
8
+ <h2><%= @page_title %></h2>
9
+ <h4 class="subheader">Right-to-left text direction support in Foundation allows you to easily switch text direction for all components.<h4>
10
+ </div>
11
+ </div>
12
+
13
+ <div class="row">
14
+ <div class="large-12 columns">
15
+ <h3>Setup</h3>
16
+ <p>Foundation 4 was built to support right-to-left text direction out of the box, but you'll need to make a couple of adjustments to your markup and SCSS to get everything up and running.</p>
17
+
18
+ <h4>Markup Changes for Right-to-Left Layouts</h4>
19
+ <p>You'll need to make a few changes to your markup to get the javascript components working nice and smooth. In the <code>html</code> tag, you'll need to add a <code>dir</code> attribute with a value of <code>rtl</code>. Here's what your <code>html</code> tag should look like:</p>
20
+ <%= code_example '
21
+ <!-- This example is for a right-to-left Arabic layout -->
22
+ <html class="no-js" lang="ar" dir="rtl">
23
+ ', :html %>
24
+ <h5>Change the Language Too</h5>
25
+ <p>You'll need to change your <code>lang</code> attribute value to match your language. Here's a handy list of common right-to-left languages and their html codes:</p>
26
+ <ul>
27
+ <li><strong>Arabic:</strong> ar</li>
28
+ <li><strong>Chinese:</strong> zh</li>
29
+ <li><strong>Farsi:</strong> fa</li>
30
+ <li><strong>Hebrew:</strong> he, iw</li>
31
+ <li><strong>Japanese:</strong> ja</li>
32
+ <li><strong>Urdu:</strong> ur</li>
33
+ <li><strong>Yiddish:</strong> yi, ji</li>
34
+ </ul>
35
+ <hr>
36
+ <h4>A Single SCSS Adjustment</h4>
37
+ <p>We made it really easy to switch the entire Foundation grid to right-to-left by changing the <code>$text-direction</code> SCSS variable. Here's what the variable should look like:</p>
38
+ <%= code_example '
39
+ $text-direction: rtl;
40
+ ', :css %>
41
+ <p>By changing this single variable, the entire grid and all the Foundation components will be switched to right-to-left orientation.</p>
42
+ <div class="panel">
43
+ <h6>Using CSS</h6>
44
+ <p>If you downloaded a static version of Foundation using the customizer to get a right-to-left support, your download should be ready to use without any of the steps mentioned above.</p>
45
+ <a href="http://foundation.zurb.com/download.php#customizeFoundation">Download Right-to-Left Foundation 4 &raquo;</a>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div class="large-3 pull-9 columns">
51
+ <%= render "_sidebar.html.erb" %>
52
+ </div>
53
+ </div>
@@ -112,7 +112,7 @@
112
112
  <hr>
113
113
 
114
114
  <h5>Want IE8 Grid Support?</h5>
115
- <p>We know it can be hard to get clients to ditch support for IE8. We're hoping with the auto-update to IE10 release from Microsoft, we won't need to worry about it anymore. Until then, here's a gist with a grid grid that will work in IE8, just like it did in Foundation 3.</p>
115
+ <p>We know it can be hard to get clients to ditch support for IE8. We're hoping with the auto-update to IE10 release from Microsoft, we won't need to worry about it anymore. Until then, here's a gist with a grid that will work in IE8, just like it did in Foundation 3.</p>
116
116
  <a class="small button" href="https://gist.github.com/zurbchris/5068210">Foundation IE8 Grid</a>
117
117
 
118
118
  <hr>
@@ -6,14 +6,14 @@
6
6
  Foundation.libs.clearing = {
7
7
  name : 'clearing',
8
8
 
9
- version : '4.0.0',
9
+ version : '4.1.0',
10
10
 
11
11
  settings : {
12
12
  templates : {
13
13
  viewing : '<a href="#" class="clearing-close">&times;</a>' +
14
14
  '<div class="visible-img" style="display: none"><img src="//:0">' +
15
- '<p class="clearing-caption"></p><a href="#" class="clearing-main-left"><span></span></a>' +
16
- '<a href="#" class="clearing-main-right"><span></span></a></div>'
15
+ '<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>' +
16
+ '<a href="#" class="clearing-main-next"><span></span></a></div>'
17
17
  },
18
18
 
19
19
  // comma delimited list of selectors that, on click, will close clearing,
@@ -25,8 +25,7 @@
25
25
  locked : false
26
26
  },
27
27
 
28
- init : function (scope, method, options) {
29
- this.scope = this.scope || scope;
28
+ init : function (method, options) {
30
29
  Foundation.inherit(this, 'set_data get_data remove_data throttle');
31
30
 
32
31
  if (typeof method === 'object') {
@@ -80,9 +79,9 @@
80
79
  self.update_paddles(target);
81
80
  })
82
81
 
83
- .on('click.fndtn.clearing', '.clearing-main-right',
82
+ .on('click.fndtn.clearing', '.clearing-main-next',
84
83
  function (e) { this.nav(e, 'next') }.bind(this))
85
- .on('click.fndtn.clearing', '.clearing-main-left',
84
+ .on('click.fndtn.clearing', '.clearing-main-prev',
86
85
  function (e) { this.nav(e, 'prev') }.bind(this))
87
86
  .on('click.fndtn.clearing', this.settings.close_selectors,
88
87
  function (e) { Foundation.libs.clearing.close(e, this) })
@@ -269,20 +268,27 @@
269
268
 
270
269
  if (target.prev().length) {
271
270
  visible_image
272
- .find('.clearing-main-left')
271
+ .find('.clearing-main-prev')
273
272
  .removeClass('disabled');
274
273
  } else {
275
274
  visible_image
276
- .find('.clearing-main-left')
275
+ .find('.clearing-main-prev')
277
276
  .addClass('disabled');
278
277
  }
279
278
  },
280
279
 
281
280
  center : function (target) {
282
- target.css({
283
- marginLeft : -(this.outerWidth(target) / 2),
284
- marginTop : -(this.outerHeight(target) / 2)
285
- });
281
+ if (!this.rtl) {
282
+ target.css({
283
+ marginLeft : -(this.outerWidth(target) / 2),
284
+ marginTop : -(this.outerHeight(target) / 2)
285
+ });
286
+ } else {
287
+ target.css({
288
+ marginRight : -(this.outerWidth(target) / 2),
289
+ marginTop : -(this.outerHeight(target) / 2)
290
+ });
291
+ }
286
292
  return this;
287
293
  },
288
294
 
@@ -328,7 +334,7 @@
328
334
  return;
329
335
  }
330
336
 
331
- if (this.complete || this.readyState === 4) {
337
+ if (image[0].complete || image[0].readyState === 4) {
332
338
  loaded();
333
339
  } else {
334
340
  bindLoad.call(image);
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.dropdown = {
7
7
  name : 'dropdown',
8
8
 
9
- version : '4.0.9',
9
+ version : '4.1.0',
10
10
 
11
11
  settings : {
12
12
  activeClass: 'open'
@@ -14,7 +14,7 @@
14
14
 
15
15
  init : function (scope, method, options) {
16
16
  this.scope = scope || this.scope;
17
- Foundation.inherit(this, 'throttle');
17
+ Foundation.inherit(this, 'throttle scrollLeft');
18
18
 
19
19
  if (typeof method === 'object') {
20
20
  $.extend(true, this.settings, method);
@@ -44,7 +44,7 @@
44
44
  $('*, html, body').on('click.fndtn.dropdown', function (e) {
45
45
  if (!$(e.target).data('dropdown')) {
46
46
  $('[data-dropdown-content]')
47
- .css('left', '-99999px')
47
+ .css(Foundation.rtl ? 'right':'left', '-99999px')
48
48
  .removeClass(self.settings.activeClass);
49
49
  }
50
50
  });
@@ -59,11 +59,11 @@
59
59
  toggle : function (target, resize) {
60
60
  var dropdown = $('#' + target.data('dropdown'));
61
61
 
62
- $('[data-dropdown-content]').not(dropdown).css('left', '-99999px').removeClass(this.settings.activeClass);
62
+ $('[data-dropdown-content]').not(dropdown).css(Foundation.rtl ? 'right':'left', '-99999px').removeClass(this.settings.activeClass);
63
63
 
64
64
  if (dropdown.hasClass(this.settings.activeClass)) {
65
65
  dropdown
66
- .css('left', '-99999px')
66
+ .css(Foundation.rtl ? 'right':'left', '-99999px')
67
67
  .removeClass(this.settings.activeClass);
68
68
  } else {
69
69
  this
@@ -82,11 +82,9 @@
82
82
  },
83
83
 
84
84
  css : function (dropdown, target) {
85
- if (dropdown.parent()[0] === $('body')[0]) {
86
- var position = target.offset();
87
- } else {
88
- var position = target.position();
89
- }
85
+ var position = target.position();
86
+ position.top += target.offsetParent().offset().top;
87
+ position.left += target.offsetParent().offset().left;
90
88
 
91
89
  if (this.small()) {
92
90
  dropdown.css({
@@ -97,7 +95,7 @@
97
95
  top: position.top + this.outerHeight(target)
98
96
  });
99
97
  } else {
100
- if ($(window).width() > this.outerWidth(dropdown) + target.offset().left) {
98
+ if (!Foundation.rtl && $(window).width() > this.outerWidth(dropdown) + target.offset().left) {
101
99
  var left = position.left;
102
100
  } else {
103
101
  if (!dropdown.hasClass('right')) {
@@ -105,6 +103,7 @@
105
103
  }
106
104
  var left = position.left - (this.outerWidth(dropdown) - this.outerWidth(target));
107
105
  }
106
+
108
107
  dropdown.attr('style', '').css({
109
108
  position : 'absolute',
110
109
  top: position.top + this.outerHeight(target),
@@ -45,6 +45,16 @@
45
45
  var self = this;
46
46
 
47
47
  $(this.scope)
48
+ .on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) {
49
+ e.preventDefault();
50
+ e.stopPropagation();
51
+ self.toggle_checkbox($(this));
52
+ })
53
+ .on('click.fndtn.forms', 'form.custom span.custom.radio', function (e) {
54
+ e.preventDefault();
55
+ e.stopPropagation();
56
+ self.toggle_radio($(this));
57
+ })
48
58
  .on('change.fndtn.forms', 'form.custom select:not([data-customforms="disabled"])', function (e) {
49
59
  self.refresh_custom_select($(this));
50
60
  })
@@ -56,26 +66,17 @@
56
66
  if ($associatedElement.attr('type') === 'checkbox') {
57
67
  e.preventDefault();
58
68
  $customCheckbox = $(this).find('span.custom.checkbox');
59
-
60
- //the checkbox might be outside after the label
61
- if ($customCheckbox.length == 0) {
62
- $customCheckbox = $(this).next('span.custom.checkbox');
63
- }
64
- //the checkbox might be outside before the label
69
+ //the checkbox might be outside after the label or inside of another element
65
70
  if ($customCheckbox.length == 0) {
66
- $customCheckbox = $(this).prev('span.custom.checkbox');
71
+ $customCheckbox = $associatedElement.add(this).siblings('span.custom.checkbox').first();
67
72
  }
68
73
  self.toggle_checkbox($customCheckbox);
69
74
  } else if ($associatedElement.attr('type') === 'radio') {
70
75
  e.preventDefault();
71
76
  $customRadio = $(this).find('span.custom.radio');
72
- //the radio might be outside after the label
77
+ //the radio might be outside after the label or inside of another element
73
78
  if ($customRadio.length == 0) {
74
- $customRadio = $(this).next('span.custom.radio');
75
- }
76
- //the radio might be outside before the label
77
- if ($customRadio.length == 0) {
78
- $customRadio = $(this).prev('span.custom.radio');
79
+ $customRadio = $associatedElement.add(this).siblings('span.custom.radio').first();
79
80
  }
80
81
  self.toggle_radio($customRadio);
81
82
  }
@@ -143,6 +144,37 @@
143
144
  }
144
145
  });
145
146
 
147
+ $(window).on('keydown', function (e) {
148
+ var focus = document.activeElement,
149
+ dropdown = $('.custom.dropdown.open');
150
+
151
+ if (dropdown.length > 0) {
152
+ e.preventDefault();
153
+
154
+ if (e.which === 13) {
155
+ dropdown.find('li.selected').trigger('click');
156
+ }
157
+
158
+ if (e.which === 38) {
159
+ var current = dropdown.find('li.selected'),
160
+ prev = current.prev(':not(.disabled)');
161
+
162
+ if (prev.length > 0) {
163
+ current.removeClass('selected');
164
+ prev.addClass('selected');
165
+ }
166
+ } else if (e.which === 40) {
167
+ var current = dropdown.find('li.selected'),
168
+ next = current.next(':not(.disabled)');
169
+
170
+ if (next.length > 0) {
171
+ current.removeClass('selected');
172
+ next.addClass('selected');
173
+ }
174
+ }
175
+ }
176
+ });
177
+
146
178
  this.settings.init = true;
147
179
  },
148
180