From: Lars Moelleken Date: Wed, 6 Aug 2014 20:26:36 +0000 (+0200) Subject: [+]: added a missing class for the fixed "magellan", so we can style it X-Git-Tag: v5.4.3~14^2~1^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5566%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git [+]: added a missing class for the fixed "magellan", so we can style it PS: there was already a "removeClass('fixed')" ;) --- diff --git a/js/foundation/foundation.magellan.js b/js/foundation/foundation.magellan.js index 31b35a11d..84b5bb918 100755 --- a/js/foundation/foundation.magellan.js +++ b/js/foundation/foundation.magellan.js @@ -12,7 +12,7 @@ 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'); @@ -35,10 +35,10 @@ settings = expedition.data('magellan-expedition-init'), hash = this.hash.split('#').join(''), target = $("a[name='"+hash+"']"); - + if (target.length === 0) { target = $('#'+hash); - + } @@ -58,7 +58,7 @@ }); }) .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)); }, @@ -111,7 +111,7 @@ 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');