I am attempting to use a JavaScript function to dynamically generate bootstrap columns. The objective is to have them appear in a single row as distinct columns.https://i.sstatic.net/50xDo.png
Here is the current appearance:
I am invoking this function on window.onload() with the div id:
// Refresh the bootstrap grid after adding tasks
function updateTaskContainerHead(containerId){
let containerHead = document.getElementById(containerId);
// Convert the row headings into an HTML container
let tblRowHeadings = ['Task Name','Assigned To','Priority','Due Date',''];
let tblHeadRow = document.createElement("div");
tblHeadRow.classname="row";
for (let heading of tblRowHeadings){
let tblHeadCell = document.createElement("div");
tblHeadCell.className="col";
let cellText = document.createTextNode(heading);
tblHeadCell.appendChild(cellText);
tblHeadRow.appendChild(tblHeadCell);
}
containerHead.appendChild(tblHeadRow);
}
and the HTML component is simply:
<lead>Completed Tasks</lead>
<div class="container" id="ongoingTasksContainer">
What could be causing the issue?