Skip to content

Instantly share code, notes, and snippets.

  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save neodigm/9967171378ec895aa8eb426426df0de5 to your computer and use it in GitHub Desktop.
Lightweight Zurb Foundation Equalizer alternative
// Lightweight ZF Equalizer alternative
// Will make two or more HTML elements the same height
// Usage: eq2.makeEqual("[data-equalizer-watch='your_pattern']");
var eq2 = {
Mx: 0,
makeEqual: function( data_eqlzr_watch ){
$( data_eqlzr_watch ).each(function(){
eq2.Mx = ( this.clientHeight > eq2.Mx ) ? this.clientHeight : eq2.Mx;
});
$( data_eqlzr_watch ).css("height", eq2.Mx + "px");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment