Foundation - markhowellsmead/helpers GitHub Wiki

Do yourself a favour: https://foundation.zurb.com/

Reset equalized elements when a sticky element is stuck or unstuck

(function($){

    // Reset any equalized elements if a sticky element is stuck or unstuck
    // Makes sure that level2 menu elements' height is corrected
    $(window).on('sticky.zf.unstuckfrom:top sticky.zf.unstuckfrom:bottom sticky.zf.stuckto:top sticky.zf.stuckto:bottom', function(){
        if(Foundation && Foundation.reInit){
            Foundation.reInit('equalizer');
        }
    });

}(jQuery));

Reinit Equalizer after view updated

e.g. Lazyload Posts. Without the if, this will throw an error foundation.min.js:3 ReferenceError: We're sorry, '_init' is not an available method for this element.

if($('[data-equalizer]').length){
	Foundation.reInit('equalizer');
}