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);
$('[' + 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) {
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');