JSFiddle - React, Tailwind, and code Playground

HTML

<div id="teste" style="height: 65px;"></div>
<div id="teste2" style="height: 65px;"></div>

CSS

#teste, #teste2 {
    border: 1px solid red;
    width: 50px;
    float: left;
}

JavaScript

function mudaAltura(idDiv) {
    var alturaAtual = document.getElementById(idDiv).offsetHeight;
    if (alturaAtual % 24 !== 0) {
        var resultado = parseInt(alturaAtual / 24);
        var novaAltura = 24 * (resultado + 1);
        document.getElementById('teste').setAttribute("style", "height:" + novaAltura + "px;");
        alert(novaAltura);
    }
}

mudaAltura("teste");