Skip to content

Commit

Permalink
Settings for Equalizer behaviour on small
Browse files Browse the repository at this point in the history
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
  • Loading branch information
winghouchan committed Apr 15, 2014
1 parent c0600e6 commit 931f047
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/foundation/foundation.equalizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -61,4 +64,4 @@
});
}
};
}(jQuery, this, this.document));
}(jQuery, this, this.document));

0 comments on commit 931f047

Please sign in to comment.