]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
[+]: added a missing class for the fixed "magellan", so we can style it 5566/head
authorLars Moelleken <lars@moelleken.org>
Wed, 6 Aug 2014 20:26:36 +0000 (22:26 +0200)
committerLars Moelleken <lars@moelleken.org>
Wed, 6 Aug 2014 20:26:36 +0000 (22:26 +0200)
PS: there was already a "removeClass('fixed')" ;)

js/foundation/foundation.magellan.js

index 31b35a11d60e180b65d0ffe021d14efcdbb66998..84b5bb9185fd05e66b8aea2d55069f1a61cabe78 100755 (executable)
@@ -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');
               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));
     },
             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');