More grid work

This commit is contained in:
Jeremy Thomas
2018-02-13 09:38:04 +00:00
parent 6d9005ad2a
commit fddb98d732
5 changed files with 58 additions and 13 deletions

View File

@@ -7,7 +7,8 @@ document.addEventListener('DOMContentLoaded', function () {
$cells.forEach(function (el) {
var parentWidth = el.parentElement.offsetWidth;
var percentage = el.offsetWidth / parentWidth * 100;
el.append('' + Math.round(percentage));
el.innerHTML = '' + percentage.toFixed(2);
// el.append(`${Math.round(el.offsetWidth)}`);
});
// Functions