const testButton = document.getElementById(“testbutton”);
function toggleClass() {
if (testButton.classList.contains(“btn-info”)) {
testButton.classList.remove(“btn-info”);
testButton.classList.add(“btn-success”);
} else {
testButton.classList.remove(“btn-success”);
testButton.classList.add(“btn-info”);
}
}
setInterval(toggleClass, 3000);
Loading…