vendor/assets/javascripts/foundation/foundation.topbar.js in foundation-rails-5.0.2.0 vs vendor/assets/javascripts/foundation/foundation.topbar.js in foundation-rails-5.0.3.0
- old
+ new
@@ -2,11 +2,11 @@
'use strict';
Foundation.libs.topbar = {
name : 'topbar',
- version: '5.0.1',
+ version: '5.0.3',
settings : {
index : 0,
sticky_class : 'sticky',
custom_back_text: true,
@@ -33,11 +33,11 @@
topbar.data('index', 0);
var topbarContainer = topbar.parent();
if(topbarContainer.hasClass('fixed') || topbarContainer.hasClass(settings.sticky_class)) {
self.settings.sticky_class = settings.sticky_class;
- self.settings.stick_topbar = topbar;
+ self.settings.sticky_topbar = topbar;
topbar.data('height', topbarContainer.outerHeight());
topbar.data('stickyoffset', topbarContainer.offset().top);
} else {
topbar.data('height', topbar.outerHeight());
}
@@ -119,10 +119,11 @@
topbar.parent().removeClass('expanded');
self.update_sticky_positioning();
} else {
topbar.addClass('fixed');
topbar.parent().addClass('expanded');
+ $('body').addClass('f-topbar-fixed');
}
}
}
},
@@ -301,12 +302,12 @@
var $link = $(this),
$dropdown = $link.siblings('.dropdown'),
url = $link.attr('href');
if (settings.mobile_show_parent_link && url && url.length > 1) {
- var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li><li><a class="parent-link js-generated" href="' + url + '">' + $link.text() +'</a></li>');
+ var $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li><a class="parent-link js-generated" href="' + url + '">' + $link.text() +'</a></li>');
} else {
- var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');
+ var $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li>');
}
// Copy link to subnav
if (settings.custom_back_text == true) {
$('h5>a', $titleLi).html(settings.back_text);