Equality for everyone

May 24, 2020 @WAT

Measure seven times before cutting

if (locationsCards.length > 0) {
    let cardHeight = $(locationsCards[0]).height();
    locationsCards.each(function () {
        let currentCardHeight = $(this).height();
        if (currentCardHeight > cardHeight) {
            cardHeight = currentCardHeight;
        }
    });

    locationsCards.each(function () {
        $(this).height(cardHeight);
    });
}