<commit_before>/**
 * Boxes AutoHeight
 *
 * @dependencies [w-breakpoints]
 * @param columns
 *
 * data-weh-add="50" add 50px to all
 *
 * @todo: css relative class for IDE support
 */
function withEqualHeight(columns) {
    var tallestcolumn = 0, add = parseInt(columns.first().attr('data-weh-add'));
    if (isNaN(add)) {
        add = 0;
    }
    columns.each(
        function () {
            $(this).css('height', 'auto');
            var currentHeight = $(this).height();
            if (currentHeight > tallestcolumn) {
                tallestcolumn = currentHeight;
            }
        }
    );
    columns.height(tallestcolumn + add);
}

$(window).on('load resize', function () {
    // .withAutoHeight > .weh for elements, non in `xs` media screen
    if (!isXs.matches) {
        $('.withEqualHeight').each(function () {
            withEqualHeight($(this).find('.weh'));
        });
    }
    // .withAutoHeightAll > .weh for all elements
    $('.withEqualHeightAll').each(function () {
        withEqualHeight($(this).find('.weh'));
    });
});<commit_msg>w-height - Added documentation and adjusted comments<commit_after>/**
 * Boxes AutoHeight
 *
 * @dependencies [w-breakpoints]
 * @param columns
 *
 * Add class to father element
 * `.withEqualHeight` = for small device and higher (not for xs)
 * `.withEqualHeightAll` = for extra small device and higher
 *
 * And to all child add class `.weh`
 *
 * If you want additional height to all elements (ex: for add a button with absolute position etc.)
 * Add `data-weh-add="50"` to children `.weh` elements (add 50px to all)
 *
 * @todo: css relative class for IDE support
 * @todo: i think the best way for data-weh-add is in father element and not in all children
 */
function withEqualHeight(columns) {
    var tallestcolumn = 0, add = parseInt(columns.first().attr('data-weh-add'));
    if (isNaN(add)) {
        add = 0;
    }
    columns.each(
        function () {
            $(this).css('height', 'auto');
            var currentHeight = $(this).height();
            if (currentHeight > tallestcolumn) {
                tallestcolumn = currentHeight;
            }
        }
    );
    columns.height(tallestcolumn + add);
}

$(window).on('load resize', function () {
    // .withEqualHeight > .weh for elements, non in `xs` media screen
    if (!isXs.matches) {
        $('.withEqualHeight').each(function () {
            withEqualHeight($(this).find('.weh'));
        });
    }
    // .withEqualHeightAll > .weh for all elements
    $('.withEqualHeightAll').each(function () {
        withEqualHeight($(this).find('.weh'));
    });
});
{'fraction_non_alphanumeric': 0.1529051987767584, 'fraction_numerical': 0.0045871559633027525, 'mean_word_length': 2.5317139001349527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6051632', 'n_tokens_mistral': 799, 'n_tokens_neox': 782, 'n_words': 206}