vendor/assets/javascripts/foundation/foundation.magellan.js in foundation-rails-5.1.0.1 vs vendor/assets/javascripts/foundation/foundation.magellan.js in foundation-rails-5.1.1.0

- old
+ new

@@ -2,11 +2,11 @@ 'use strict'; Foundation.libs['magellan-expedition'] = { name : 'magellan-expedition', - version : '5.1.0', + version : '5.1.1', settings : { active_class: 'active', threshold: 0, // pixels from the top of the expedition for it to become fixes destination_threshold: 20, // pixels from the top of destination for it to be considered active @@ -27,13 +27,13 @@ self.set_expedition_position(); S(self.scope) .off('.magellan') - .on('click.fndtn.magellan', '[data-magellan-arrival] a[href^="#"]', function (e) { + .on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href^="#"]', function (e) { e.preventDefault(); - var expedition = $(this).closest('[data-magellan-expedition]'), + var expedition = $(this).closest('[' + self.attr_name() + ']'), settings = expedition.data('magellan-expedition-init'); var hash = this.hash.split('#').join(''), target = $('a[name='+hash+']'); if (target.length === 0) target = $('#'+hash); @@ -84,20 +84,20 @@ top_offset = expedition.data('magellan-top-offset'); if (window_top_offset >= top_offset) { // Placeholder allows height calculations to be consistent even when // appearing to switch between fixed/non-fixed placement - var placeholder = expedition.prev('[data-magellan-expedition-clone]'); + var placeholder = expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']'); if (placeholder.length === 0) { placeholder = expedition.clone(); - placeholder.removeAttr('data-magellan-expedition'); - placeholder.attr('data-magellan-expedition-clone',''); + placeholder.removeAttr(self.attr_name()); + placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),''); expedition.before(placeholder); } expedition.css({position:'fixed', top: 0}); } else { - expedition.prev('[data-magellan-expedition-clone]').remove(); + expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove(); expedition.attr('style',''); } }); }, @@ -163,9 +163,9 @@ }, reflow : function () { var self = this; // remove placeholder expeditions used for height calculation purposes - $('[data-magellan-expedition-clone]', self.scope).remove(); + $('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove(); } }; }(jQuery, this, this.document)); \ No newline at end of file