From 931f047b86223257c04806a1a162062c654aff33 Mon Sep 17 00:00:00 2001 From: Wing-Hou Chan Date: Tue, 15 Apr 2014 14:35:29 +0100 Subject: [PATCH] Settings for Equalizer behaviour on small Added functionality to determine what Equalizer will do on viewports <641px. Current behaviour once the elements Equalizer is watching become stacked is to set the height to inherit, however with this new functionality will allow users to specify Equalizer to continue making the elements it is watching an equal height. Check out this thread on Foundation Forum on the discussion behind this: http://foundation.zurb.com/forum/posts/7483-equalizer-column-height-when-stacked-not-equalising --- js/foundation/foundation.equalizer.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/foundation/foundation.equalizer.js b/js/foundation/foundation.equalizer.js index 4a28334a8b..c70745697b 100644 --- a/js/foundation/foundation.equalizer.js +++ b/js/foundation/foundation.equalizer.js @@ -9,7 +9,8 @@ settings : { use_tallest: true, before_height_change: $.noop, - after_height_change: $.noop + after_height_change: $.noop, + equalize_on_small: false }, init : function (scope, method, options) { @@ -39,7 +40,9 @@ isStacked = true; } }); - if (isStacked) return; + if(settings.equalize_on_small === false){ + if (isStacked) return; + }; var heights = vals.map(function(){ return $(this).outerHeight() }); if (settings.use_tallest) { @@ -61,4 +64,4 @@ }); } }; -}(jQuery, this, this.document)); \ No newline at end of file +}(jQuery, this, this.document));