thematdevdotorg/static/js/projects.js

14 lines
395 B
JavaScript
Raw Normal View History

2020-11-07 15:10:52 +03:00
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);