Last active
April 4, 2017 11:55
-
-
Save Burick/64a2eb788621f811e422221c771d26c3 to your computer and use it in GitHub Desktop.
Вычисляет самый высокий столбец и все остальные в наборе делает по его высоте
This file contains hidden or 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
/* | |
функция опледеления элемента | |
с наибольшей высотой | |
*/ | |
$(function(){ | |
function setEqualHeight(columns){ | |
var tallestcolumn = 0; | |
columns = $(columns); | |
columns.each( | |
function(){ | |
currentHeight = $(this).height(); | |
if(currentHeight > tallestcolumn) | |
{ | |
tallestcolumn = currentHeight; | |
} | |
} | |
); | |
columns.height(tallestcolumn); | |
} | |
setEqualHeight('.news-block .action-i'); | |
}); | |
/* | |
Использоваие | |
setEqualHeight($('.selector')); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment