The "document" function does not work with "querySelectorAll('.class').forEach(class => {});"
This is the codeblock i am using:
function applyTheme(theme) {
document.body.style.background = theme.background;
document.querySelectorAll('.container').forEach(container => {
container.style.color = theme.textColor;
});
document.querySelectorAll('input[type="button"]').forEach(button => {
button.style.backgroundColor = theme.buttonColor;
});
document.querySelectorAll('#leaderboard th').forEach(button => {
button.style.backgroundColor = theme.buttonColor;
});
}
oh noes tells me: "Javascript error: Unexpected Token >"
Please sign in to leave a comment.