thematdevdotorg/static/js/projects.js
2020-11-07 15:10:52 +03:00

14 lines
395 B
JavaScript

function alignHeadersByHeight(table) {
var maxHeight = 0;
table.querySelectorAll('h1').forEach(
element => maxHeight = Math.max(maxHeight, element.clientHeight)
)
table.querySelectorAll('h1').forEach(
element => element.style.height = maxHeight + 'px'
)
console.log(maxHeight);
}
var table = document.getElementById("pbic");
alignHeadersByHeight(table);