From: Guillaume Lafarge Date: Thu, 5 Jun 2014 12:52:37 +0000 (+0200) Subject: data-options fix X-Git-Tag: v5.3.0~12^2~2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5270%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git data-options fix Some options aren't correctly parsed in `data-options` attribute. I think this should fix the issue. --- diff --git a/js/foundation/foundation.magellan.js b/js/foundation/foundation.magellan.js index 32ce5d07d..2187067f5 100644 --- a/js/foundation/foundation.magellan.js +++ b/js/foundation/foundation.magellan.js @@ -71,11 +71,12 @@ var self = this; $('[' + this.attr_name() + '=fixed]', self.scope).each(function(idx, el) { var expedition = $(this), + settings = expedition.data('magellan-expedition-init'), styles = expedition.attr('styles'), // save styles top_offset; expedition.attr('style', ''); - top_offset = expedition.offset().top + self.settings.threshold; + top_offset = expedition.offset().top + settings.threshold; expedition.data(self.data_attr('magellan-top-offset'), top_offset); expedition.attr('style', styles); @@ -88,6 +89,7 @@ $('[' + this.attr_name() + '=fixed]', self.scope).each(function() { var expedition = $(this), + settings = expedition.data('magellan-expedition-init'), top_offset = expedition.data('magellan-top-offset'); if (window_top_offset >= top_offset) { @@ -100,7 +102,7 @@ placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),''); expedition.before(placeholder); } - expedition.css({position:'fixed', top: self.settings.fixed_top}); + expedition.css({position:'fixed', top: settings.fixed_top}); } else { expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove(); expedition.attr('style','').removeClass('fixed');