foundation-rails 5.5.2.1 → 5.5.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/bower.json +2 -2
  4. data/lib/foundation/rails/version.rb +1 -1
  5. data/vendor/assets/javascripts/foundation.js +1 -1
  6. data/vendor/assets/javascripts/foundation/foundation.abide.js +42 -24
  7. data/vendor/assets/javascripts/foundation/foundation.accordion.js +39 -2
  8. data/vendor/assets/javascripts/foundation/foundation.alert.js +1 -1
  9. data/vendor/assets/javascripts/foundation/foundation.clearing.js +5 -5
  10. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +17 -12
  11. data/vendor/assets/javascripts/foundation/foundation.equalizer.js +1 -1
  12. data/vendor/assets/javascripts/foundation/foundation.interchange.js +3 -2
  13. data/vendor/assets/javascripts/foundation/foundation.joyride.js +53 -50
  14. data/vendor/assets/javascripts/foundation/foundation.js +24 -17
  15. data/vendor/assets/javascripts/foundation/foundation.magellan.js +4 -5
  16. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +75 -2
  17. data/vendor/assets/javascripts/foundation/foundation.orbit.js +1 -1
  18. data/vendor/assets/javascripts/foundation/foundation.reveal.js +40 -16
  19. data/vendor/assets/javascripts/foundation/foundation.slider.js +21 -6
  20. data/vendor/assets/javascripts/foundation/foundation.tab.js +25 -27
  21. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +24 -15
  22. data/vendor/assets/javascripts/foundation/foundation.topbar.js +11 -11
  23. data/vendor/assets/stylesheets/foundation.scss +0 -2
  24. data/vendor/assets/stylesheets/foundation/_functions.scss +2 -2
  25. data/vendor/assets/stylesheets/foundation/_settings.scss +6 -3
  26. data/vendor/assets/stylesheets/foundation/components/_accordion.scss +6 -2
  27. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +2 -1
  28. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +1 -0
  29. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +18 -13
  30. data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +3 -2
  31. data/vendor/assets/stylesheets/foundation/components/_forms.scss +21 -23
  32. data/vendor/assets/stylesheets/foundation/components/_global.scss +73 -9
  33. data/vendor/assets/stylesheets/foundation/components/_grid.scss +15 -15
  34. data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +2 -1
  35. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +1 -1
  36. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +92 -4
  37. data/vendor/assets/stylesheets/foundation/components/_pagination.scss +1 -0
  38. data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +6 -0
  39. data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +2 -2
  40. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +3 -0
  41. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +1 -1
  42. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +1 -1
  43. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +11 -3
  44. data/vendor/assets/stylesheets/foundation/components/_type.scss +73 -12
  45. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +8 -75
  46. metadata +3 -4
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Foundation Responsive Library
3
3
  * http://foundation.zurb.com
4
- * Copyright 2014, ZURB
4
+ * Copyright 2015, ZURB
5
5
  * Free to use under the MIT license.
6
6
  * http://www.opensource.org/licenses/mit-license.php
7
7
  */
@@ -10,14 +10,12 @@
10
10
  'use strict';
11
11
 
12
12
  var header_helpers = function (class_array) {
13
- var i = class_array.length;
14
13
  var head = $('head');
15
-
16
- while (i--) {
17
- if (head.has('.' + class_array[i]).length === 0) {
18
- head.append('<meta class="' + class_array[i] + '" />');
14
+ head.prepend($.map(class_array, function (class_name) {
15
+ if (head.has('.' + class_name).length === 0) {
16
+ return '<meta class="' + class_name + '" />';
19
17
  }
20
- }
18
+ }));
21
19
  };
22
20
 
23
21
  header_helpers([
@@ -290,21 +288,30 @@
290
288
  return string;
291
289
  }
292
290
 
291
+ function MediaQuery(selector) {
292
+ this.selector = selector;
293
+ this.query = '';
294
+ }
295
+
296
+ MediaQuery.prototype.toString = function () {
297
+ return this.query || (this.query = S(this.selector).css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''));
298
+ };
299
+
293
300
  window.Foundation = {
294
301
  name : 'Foundation',
295
302
 
296
- version : '5.5.2',
303
+ version : '5.5.3',
297
304
 
298
305
  media_queries : {
299
- 'small' : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
300
- 'small-only' : S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
301
- 'medium' : S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
302
- 'medium-only' : S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
303
- 'large' : S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
304
- 'large-only' : S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
305
- 'xlarge' : S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
306
- 'xlarge-only' : S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
307
- 'xxlarge' : S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, '')
306
+ 'small' : new MediaQuery('.foundation-mq-small'),
307
+ 'small-only' : new MediaQuery('.foundation-mq-small-only'),
308
+ 'medium' : new MediaQuery('.foundation-mq-medium'),
309
+ 'medium-only' : new MediaQuery('.foundation-mq-medium-only'),
310
+ 'large' : new MediaQuery('.foundation-mq-large'),
311
+ 'large-only' : new MediaQuery('.foundation-mq-large-only'),
312
+ 'xlarge' : new MediaQuery('.foundation-mq-xlarge'),
313
+ 'xlarge-only' : new MediaQuery('.foundation-mq-xlarge-only'),
314
+ 'xxlarge' : new MediaQuery('.foundation-mq-xxlarge')
308
315
  },
309
316
 
310
317
  stylesheet : $('<style></style>').appendTo('head')[0].sheet,
@@ -4,7 +4,7 @@
4
4
  Foundation.libs['magellan-expedition'] = {
5
5
  name : 'magellan-expedition',
6
6
 
7
- version : '5.5.2',
7
+ version : '5.5.3',
8
8
 
9
9
  settings : {
10
10
  active_class : 'active',
@@ -59,11 +59,10 @@
59
59
  'scrollTop' : scroll_top
60
60
  }, settings.duration, settings.easing, function () {
61
61
  if (history.pushState) {
62
- history.pushState(null, null, anchor.pathname + '#' + hash);
62
+ history.pushState(null, null, anchor.pathname + anchor.search + '#' + hash);
63
+ } else {
64
+ location.hash = anchor.pathname + anchor.search + '#' + hash;
63
65
  }
64
- else {
65
- location.hash = anchor.pathname + '#' + hash;
66
- }
67
66
  });
68
67
  }
69
68
  })
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.offcanvas = {
5
5
  name : 'offcanvas',
6
6
 
7
- version : '5.5.2',
7
+ version : '5.5.3',
8
8
 
9
9
  settings : {
10
10
  open_method : 'move',
@@ -20,16 +20,22 @@
20
20
  S = self.S,
21
21
  move_class = '',
22
22
  right_postfix = '',
23
- left_postfix = '';
23
+ left_postfix = '',
24
+ top_postfix = '',
25
+ bottom_postfix = '';
24
26
 
25
27
  if (this.settings.open_method === 'move') {
26
28
  move_class = 'move-';
27
29
  right_postfix = 'right';
28
30
  left_postfix = 'left';
31
+ top_postfix = 'top';
32
+ bottom_postfix = 'bottom';
29
33
  } else if (this.settings.open_method === 'overlap_single') {
30
34
  move_class = 'offcanvas-overlap-';
31
35
  right_postfix = 'right';
32
36
  left_postfix = 'left';
37
+ top_postfix = 'top';
38
+ bottom_postfix = 'bottom';
33
39
  } else if (this.settings.open_method === 'overlap') {
34
40
  move_class = 'offcanvas-overlap';
35
41
  }
@@ -58,6 +64,7 @@
58
64
  }
59
65
  $('.left-off-canvas-toggle').attr('aria-expanded', 'true');
60
66
  })
67
+ //end of left canvas
61
68
  .on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
62
69
  self.click_toggle_class(e, move_class + left_postfix);
63
70
  if (self.settings.open_method !== 'overlap') {
@@ -81,6 +88,55 @@
81
88
  }
82
89
  $('.right-off-canvas-toggle').attr('aria-expanded', 'true');
83
90
  })
91
+ //end of right canvas
92
+ .on('click.fndtn.offcanvas', '.top-off-canvas-toggle', function (e) {
93
+ self.click_toggle_class(e, move_class + bottom_postfix);
94
+ if (self.settings.open_method !== 'overlap') {
95
+ S('.top-submenu').removeClass(move_class + bottom_postfix);
96
+ }
97
+ $('.top-off-canvas-toggle').attr('aria-expanded', 'true');
98
+ })
99
+ .on('click.fndtn.offcanvas', '.top-off-canvas-menu a', function (e) {
100
+ var settings = self.get_settings(e);
101
+ var parent = S(this).parent();
102
+
103
+ if (settings.close_on_click && !parent.hasClass('has-submenu') && !parent.hasClass('back')) {
104
+ self.hide.call(self, move_class + bottom_postfix, self.get_wrapper(e));
105
+ parent.parent().removeClass(move_class + bottom_postfix);
106
+ } else if (S(this).parent().hasClass('has-submenu')) {
107
+ e.preventDefault();
108
+ S(this).siblings('.top-submenu').toggleClass(move_class + bottom_postfix);
109
+ } else if (parent.hasClass('back')) {
110
+ e.preventDefault();
111
+ parent.parent().removeClass(move_class + bottom_postfix);
112
+ }
113
+ $('.top-off-canvas-toggle').attr('aria-expanded', 'true');
114
+ })
115
+ //end of top canvas
116
+ .on('click.fndtn.offcanvas', '.bottom-off-canvas-toggle', function (e) {
117
+ self.click_toggle_class(e, move_class + top_postfix);
118
+ if (self.settings.open_method !== 'overlap') {
119
+ S('.bottom-submenu').removeClass(move_class + top_postfix);
120
+ }
121
+ $('.bottom-off-canvas-toggle').attr('aria-expanded', 'true');
122
+ })
123
+ .on('click.fndtn.offcanvas', '.bottom-off-canvas-menu a', function (e) {
124
+ var settings = self.get_settings(e);
125
+ var parent = S(this).parent();
126
+
127
+ if (settings.close_on_click && !parent.hasClass('has-submenu') && !parent.hasClass('back')) {
128
+ self.hide.call(self, move_class + top_postfix, self.get_wrapper(e));
129
+ parent.parent().removeClass(move_class + top_postfix);
130
+ } else if (S(this).parent().hasClass('has-submenu')) {
131
+ e.preventDefault();
132
+ S(this).siblings('.bottom-submenu').toggleClass(move_class + top_postfix);
133
+ } else if (parent.hasClass('back')) {
134
+ e.preventDefault();
135
+ parent.parent().removeClass(move_class + top_postfix);
136
+ }
137
+ $('.bottom-off-canvas-toggle').attr('aria-expanded', 'true');
138
+ })
139
+ //end of bottom
84
140
  .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
85
141
  self.click_remove_class(e, move_class + left_postfix);
86
142
  S('.right-submenu').removeClass(move_class + left_postfix);
@@ -97,6 +153,23 @@
97
153
  self.click_remove_class(e, move_class + right_postfix);
98
154
  $('.right-off-canvas-toggle').attr('aria-expanded', 'false');
99
155
  }
156
+ })
157
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
158
+ self.click_remove_class(e, move_class + top_postfix);
159
+ S('.bottom-submenu').removeClass(move_class + top_postfix);
160
+ if (bottom_postfix) {
161
+ self.click_remove_class(e, move_class + bottom_postfix);
162
+ S('.top-submenu').removeClass(move_class + top_postfix);
163
+ }
164
+ $('.bottom-off-canvas-toggle').attr('aria-expanded', 'true');
165
+ })
166
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
167
+ self.click_remove_class(e, move_class + top_postfix);
168
+ $('.top-off-canvas-toggle').attr('aria-expanded', 'false');
169
+ if (bottom_postfix) {
170
+ self.click_remove_class(e, move_class + bottom_postfix);
171
+ $('.bottom-off-canvas-toggle').attr('aria-expanded', 'false');
172
+ }
100
173
  });
101
174
  },
102
175
 
@@ -407,7 +407,7 @@
407
407
  Foundation.libs.orbit = {
408
408
  name : 'orbit',
409
409
 
410
- version : '5.5.2',
410
+ version : '5.5.3',
411
411
 
412
412
  settings : {
413
413
  animation : 'slide',
@@ -1,10 +1,12 @@
1
1
  ;(function ($, window, document, undefined) {
2
2
  'use strict';
3
3
 
4
+ var openModals = [];
5
+
4
6
  Foundation.libs.reveal = {
5
7
  name : 'reveal',
6
8
 
7
- version : '5.5.2',
9
+ version : '5.5.3',
8
10
 
9
11
  locked : false,
10
12
 
@@ -155,7 +157,7 @@
155
157
  settings = settings || this.settings;
156
158
 
157
159
 
158
- if (modal.hasClass('open') && target.attr('data-reveal-id') == modal.attr('id')) {
160
+ if (modal.hasClass('open') && target !== undefined && target.attr('data-reveal-id') == modal.attr('id')) {
159
161
  return self.close(modal);
160
162
  }
161
163
 
@@ -188,16 +190,25 @@
188
190
  };
189
191
  }
190
192
 
191
- if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
192
- if (open_modal.length > 0) {
193
- if (settings.multiple_opened) {
193
+ var openModal = function() {
194
+ if(open_modal.length > 0) {
195
+ if(settings.multiple_opened) {
194
196
  self.to_back(open_modal);
195
197
  } else {
196
198
  self.hide(open_modal, settings.css.close);
197
199
  }
198
200
  }
199
201
 
200
- this.show(modal, settings.css.open);
202
+ // bl: add the open_modal that isn't already in the background to the openModals array
203
+ if(settings.multiple_opened) {
204
+ openModals.push(modal);
205
+ }
206
+
207
+ self.show(modal, settings.css.open);
208
+ };
209
+
210
+ if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
211
+ openModal();
201
212
  } else {
202
213
  var old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null;
203
214
  $.extend(ajax_settings, {
@@ -218,14 +229,7 @@
218
229
  self.S(modal).foundation('section', 'reflow');
219
230
  self.S(modal).children().foundation();
220
231
 
221
- if (open_modal.length > 0) {
222
- if (settings.multiple_opened) {
223
- self.to_back(open_modal);
224
- } else {
225
- self.hide(open_modal, settings.css.close);
226
- }
227
- }
228
- self.show(modal, settings.css.open);
232
+ openModal();
229
233
  }
230
234
  });
231
235
 
@@ -263,8 +267,27 @@
263
267
  }
264
268
 
265
269
  if (settings.multiple_opened) {
270
+ var isCurrent = modal.is(':not(.toback)');
266
271
  self.hide(modal, settings.css.close, settings);
267
- self.to_front($($.makeArray(open_modals).reverse()[1]));
272
+ if(isCurrent) {
273
+ // remove the last modal since it is now closed
274
+ openModals.pop();
275
+ } else {
276
+ // if this isn't the current modal, then find it in the array and remove it
277
+ openModals = $.grep(openModals, function(elt) {
278
+ var isThis = elt[0]===modal[0];
279
+ if(isThis) {
280
+ // since it's not currently in the front, put it in the front now that it is hidden
281
+ // so that if it's re-opened, it won't be .toback
282
+ self.to_front(modal);
283
+ }
284
+ return !isThis;
285
+ });
286
+ }
287
+ // finally, show the next modal in the stack, if there is one
288
+ if(openModals.length>0) {
289
+ self.to_front(openModals[openModals.length - 1]);
290
+ }
268
291
  } else {
269
292
  self.hide(open_modals, settings.css.close, settings);
270
293
  }
@@ -337,8 +360,9 @@
337
360
  }, settings.animation_speed / 2);
338
361
  }
339
362
 
363
+ css.top = $(window).scrollTop() + el.data('css-top') + 'px';
364
+
340
365
  if (animData.fade) {
341
- css.top = $(window).scrollTop() + el.data('css-top') + 'px';
342
366
  var end_css = {opacity: 1};
343
367
 
344
368
  return setTimeout(function () {
@@ -4,13 +4,13 @@
4
4
  Foundation.libs.slider = {
5
5
  name : 'slider',
6
6
 
7
- version : '5.5.2',
7
+ version : '5.5.3',
8
8
 
9
9
  settings : {
10
10
  start : 0,
11
11
  end : 100,
12
12
  step : 1,
13
- precision : null,
13
+ precision : 2,
14
14
  initial : null,
15
15
  display_selector : '',
16
16
  vertical : false,
@@ -28,7 +28,6 @@
28
28
 
29
29
  events : function () {
30
30
  var self = this;
31
-
32
31
  $(this.scope)
33
32
  .off('.slider')
34
33
  .on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider',
@@ -53,6 +52,23 @@
53
52
  }
54
53
  })
55
54
  .on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider', function (e) {
55
+ if(!self.cache.active) {
56
+ // if the user has just clicked into the slider without starting to drag the handle
57
+ var slider = $(e.target).attr('role') === 'slider' ? $(e.target) : $(e.target).closest('.range-slider').find("[role='slider']");
58
+
59
+ if (slider.length && (!slider.parent().hasClass('disabled') && !slider.parent().attr('disabled'))) {
60
+ self.set_active_slider(slider);
61
+ if ($.data(self.cache.active[0], 'settings').vertical) {
62
+ var scroll_offset = 0;
63
+ if (!e.pageY) {
64
+ scroll_offset = window.scrollY;
65
+ }
66
+ self.calculate_position(self.cache.active, self.get_cursor_position(e, 'y') + scroll_offset);
67
+ } else {
68
+ self.calculate_position(self.cache.active, self.get_cursor_position(e, 'x'));
69
+ }
70
+ }
71
+ }
56
72
  self.remove_active_slider();
57
73
  })
58
74
  .on('change.fndtn.slider', function (e) {
@@ -72,9 +88,8 @@
72
88
 
73
89
  if (settings.display_selector != '') {
74
90
  $(settings.display_selector).each(function(){
75
- if (this.hasOwnProperty('value')) {
76
- $(this).change(function(){
77
- // is there a better way to do this?
91
+ if ($(this).attr('value')) {
92
+ $(this).off('change').on('change', function () {
78
93
  slider.foundation("slider", "set_value", $(this).val());
79
94
  });
80
95
  }
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.tab = {
5
5
  name : 'tab',
6
6
 
7
- version : '5.5.2',
7
+ version : '5.5.3',
8
8
 
9
9
  settings : {
10
10
  active_class : 'active',
@@ -20,16 +20,12 @@
20
20
  var self = this,
21
21
  S = this.S;
22
22
 
23
- // Store the default active tabs which will be referenced when the
24
- // location hash is absent, as in the case of navigating the tabs and
25
- // returning to the first viewing via the browser Back button.
26
- S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
27
- self.default_tab_hashes.push(this.hash);
28
- });
29
-
30
- // store the initial href, which is used to allow correct behaviour of the
31
- // browser back button when deep linking is turned on.
32
- self.entry_location = window.location.href;
23
+ // Store the default active tabs which will be referenced when the
24
+ // location hash is absent, as in the case of navigating the tabs and
25
+ // returning to the first viewing via the browser Back button.
26
+ S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
27
+ self.default_tab_hashes.push(this.hash);
28
+ });
33
29
 
34
30
  this.bindings(method, options);
35
31
  this.handle_location_hash_change();
@@ -40,26 +36,29 @@
40
36
  S = this.S;
41
37
 
42
38
  var usual_tab_behavior = function (e, target) {
43
- var settings = S(target).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
44
- if (!settings.is_hover || Modernizr.touch) {
39
+ var settings = S(target).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
40
+ if (!settings.is_hover || Modernizr.touch) {
41
+ // if user did not pressed tab key, prevent default action
42
+ var keyCode = e.keyCode || e.which;
43
+ if (keyCode !== 9) {
45
44
  e.preventDefault();
46
45
  e.stopPropagation();
47
- self.toggle_active_tab(S(target).parent());
48
46
  }
49
- };
47
+ self.toggle_active_tab(S(target).parent());
48
+
49
+ }
50
+ };
50
51
 
51
52
  S(this.scope)
52
53
  .off('.tab')
53
54
  // Key event: focus/tab key
54
55
  .on('keydown.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
55
- var el = this;
56
56
  var keyCode = e.keyCode || e.which;
57
- // if user pressed tab key
58
- if (keyCode == 9) {
59
- e.preventDefault();
60
- // TODO: Change usual_tab_behavior into accessibility function?
61
- usual_tab_behavior(e, el);
62
- }
57
+ // if user pressed tab key
58
+ if (keyCode === 13 || keyCode === 32) { // enter or space
59
+ var el = this;
60
+ usual_tab_behavior(e, el);
61
+ }
63
62
  })
64
63
  // Click event: tab title
65
64
  .on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
@@ -181,10 +180,9 @@
181
180
  go_to_hash = function(hash) {
182
181
  // This function allows correct behaviour of the browser's back button when deep linking is enabled. Without it
183
182
  // the user would get continually redirected to the default hash.
184
- var is_entry_location = window.location.href === self.entry_location,
185
- default_hash = settings.scroll_to_content ? self.default_tab_hashes[0] : is_entry_location ? window.location.hash :'fndtn-' + self.default_tab_hashes[0].replace('#', '')
183
+ var default_hash = settings.scroll_to_content ? self.default_tab_hashes[0] : 'fndtn-' + self.default_tab_hashes[0].replace('#', '');
186
184
 
187
- if (!(is_entry_location && hash === default_hash)) {
185
+ if (hash !== default_hash || window.location.hash) {
188
186
  window.location.hash = hash;
189
187
  }
190
188
  };
@@ -224,8 +222,8 @@
224
222
  tab.addClass(settings.active_class).triggerHandler('opened');
225
223
  tab_link.attr({'aria-selected' : 'true', tabindex : 0});
226
224
  siblings.removeClass(settings.active_class)
227
- siblings.find('a').attr({'aria-selected' : 'false', tabindex : -1});
228
- target.siblings().removeClass(settings.active_class).attr({'aria-hidden' : 'true', tabindex : -1});
225
+ siblings.find('a').attr({'aria-selected' : 'false'/*, tabindex : -1*/});
226
+ target.siblings().removeClass(settings.active_class).attr({'aria-hidden' : 'true'/*, tabindex : -1*/});
229
227
  target.addClass(settings.active_class).attr('aria-hidden', 'false').removeAttr('tabindex');
230
228
  settings.callback(tab);
231
229
  target.triggerHandler('toggled', [target]);