Skip to content

Instantly share code, notes, and snippets.

@juananruiz
Created March 29, 2017 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juananruiz/7d4035300228ce2322f2174f0d0b30d1 to your computer and use it in GitHub Desktop.
Save juananruiz/7d4035300228ce2322f2174f0d0b30d1 to your computer and use it in GitHub Desktop.
Iguala la altura de los elementos de una página al más alto
$.fn.iguala = function() {
var alturaMaxima = 0;
$(this).each(function(e){
var elementoAltura = $(this).height();
if (elementoAltura > alturaMaxima)
{
alturaMaxima = elementoAltura;
}
});
//se le sumaa 20 para que no se salga el contenido, creo que es por algún
//css del div o elemento de bloque que en nuestra app es well well-mini
return $(this).height(alturaMaxima+5);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment