Add class if element overflow above certain value
$.each($('td.epreuves .collapse-cell'), function(){ var height = $(this)[0].scrollHeight; if (height <= 46) { $(this).addClass('no-after'); } });