]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add a the class 'fixed' when navigation is 'stuck' 5522/head
authorLarzans <larzans@gmail.com>
Wed, 30 Jul 2014 14:50:46 +0000 (16:50 +0200)
committerLarzans <larzans@gmail.com>
Wed, 30 Jul 2014 14:50:46 +0000 (16:50 +0200)
In line 117 the class 'fixed' is removed from the navigation without ever being added.

I assume the intention was to add a class to the navigation when it is stuck to the window so that additional skinning via CSS can be done (thats what i actually wanted to do but didn't find this functionality yet).
Browsing through the code i saw that you REMOVE a class 'fixed' when the navigation is 'unstuck' but you never add it.
This fixes that.

When the navigation sticks to the top it has the class 'fixed', as soon as it gets 'unstuck' the class is removed.

js/foundation/foundation.magellan.js

index ec976ffb6855204bbcf2604b86f66d6348dff356..60162c6824652e72a3dac4298cfc7f00a1c5d9b0 100755 (executable)
             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');