destination_threshold: 20, // pixels from the top of destination for it to be considered active
throttle_delay: 30, // calculation throttling to increase framerate
fixed_top: 0 // top distance in pixels assigend to the fixed element on scroll
- },
+ },
init : function (scope, method, options) {
Foundation.inherit(this, 'throttle');
settings = expedition.data('magellan-expedition-init'),
hash = this.hash.split('#').join(''),
target = $("a[name='"+hash+"']");
-
+
if (target.length === 0) {
target = $('#'+hash);
-
+
}
});
})
.on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay));
-
+
$(window)
.on('resize.fndtn.magellan', self.throttle(this.set_expedition_position.bind(this), settings.throttle_delay));
},
placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),'');
expedition.before(placeholder);
}
- expedition.css({position:'fixed', top: settings.fixed_top});
+ expedition.css({position:'fixed', top: settings.fixed_top}).addClass('fixed');
} else {
expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
expedition.attr('style',styles).css('position','').css('top','').removeClass('fixed');