Menu
I’m trying to change my background image via JS.
I can do this but I loose my
background-position: center;
background-size: cover;
settings when I do so.
Here’s my JS code.
Any ideas?
“`
setTimeout(changeImg, 3000);
function changeImg(){
document.getElementById(“banner”).style.background = “url(‘../images/img3.jpg’)”;
}