I have a problem and don't know the solution. Here is my HTML
<div id="thumb">
</div>
CSS:
#thumb {
width: 100%;
position: relative;
height: 557px;
background-image: linear-gradient(
rgba(252, 191, 73, 0.3),
rgba(252, 191, 73, 0.3)
),
url("../img/thumb.jpg");
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
text-align: center;
color: #000;
}
JS:
var sliderGet = document.getElementById("thumb").style.backgroundImage;
sliderGet = 'url("../img/thumb2.jpg")';
There is no way to change to thumb2.jpg using js...
document.getElementById("thumb").style.backgroundImage = 'url("../img/thumb2.jpg")'var x = 3; x = 5;. Would you expect3to change?onCLick