Created
March 29, 2017 18:09
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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