stuart-b
7/22/2016 - 11:22 AM

Height matching jQuery

Height matching jQuery

// Equalize plugin
    $.fn.equalize = function () {
        var maxHeight = 0;
        this.each(function () {
            if ($(this).height() > maxHeight) {
                maxHeight = $(this).height();
            }
        });
        this.height(maxHeight);
    };

    // Use generic class
    $('.js-equalize').equalize();