From: Kristofer Krause Date: Tue, 28 Mar 2017 19:42:36 +0000 (-0400) Subject: Address V5 Issue #9910 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9911%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Address V5 Issue #9910 Fixes V5 Issue #9910 --- diff --git a/js/foundation/foundation.topbar.js b/js/foundation/foundation.topbar.js index 511d1348a..5f1c4c428 100644 --- a/js/foundation/foundation.topbar.js +++ b/js/foundation/foundation.topbar.js @@ -134,7 +134,7 @@ } } } else { - if (self.is_sticky(topbar, topbar.parent(), settings) && topbar.parent().offset().top==0) { + if (self.is_sticky(topbar, topbar.parent(), settings) && topbar.parent().offset().top === 0) { topbar.parent().addClass('fixed'); } @@ -315,8 +315,7 @@ resize : function () { var self = this; self.S('[' + this.attr_name() + ']').each(function () { - var topbar = self.S(this), - settings = topbar.data(self.attr_name(true) + '-init'); + var topbar = self.S(this); var stickyContainer = topbar.parent('.' + self.settings.sticky_class); var stickyOffset; @@ -334,7 +333,7 @@ } } - if (self.is_sticky(topbar, stickyContainer, settings)) { + if (self.is_sticky(topbar, stickyContainer, self.settings)) { if (stickyContainer.hasClass('fixed')) { // Remove the fixed to allow for correct calculation of the offset. stickyContainer.removeClass('fixed'); @@ -387,14 +386,14 @@ if (!$dropdown.find('.title.back').length) { - if (settings.mobile_show_parent_link == true && url) { + if (settings.mobile_show_parent_link === true && url) { $titleLi = $('
  • '); } else { $titleLi = $('
  • '); } // Copy link to subnav - if (settings.custom_back_text == true) { + if (settings.custom_back_text === true) { $('h5>a', $titleLi).html(settings.back_text); } else { $('h5>a', $titleLi).html('« ' + $link.html());