I am in the process of completing CS50 and a took the WEB Tracks. I am currently searching for a solution with a JS problem.
function blink() {
let body = document.querySelector('body');
if (body.style.visibility === 'hidden') {
body.style.visibility = 'visible';
} else {
body.style.visibility = 'hidden';
}
}
// Blink every 500ms
window.setInterval(blink, 500);
This is a working solution, however I need to alter it so that it selects all specific ids. For example id="image". I found an adaptation that only select 1 picture and makes it blink. How do i make all three blink?
There is an obvious solution with writing more code, but i hope there is another way