var appealWidgetContent = document.getElementById("appeal-widget-content"); appealWidgetContent.setAttribute("id", "appeals-widget"); appealWidgetContent.setAttribute("class", "card card-body mt-3"); var noAppeals = document.createElement('div'); noAppeals.setAttribute("id", "no-appeals"); noAppeals.setAttribute("class", "alert alert-info"); noAppeals.innerHTML = "No appeals"; appealWidgetContent.appendChild(noAppeals);