JSFiddle - React, Tailwind, and code Playground
HTML
<div class="closed"></div>
CSS
.closed {
background-image: url(https://www.aristo.com.hk/images/chist_banner_2017.png);
width:300px;
height:300px;
}
JavaScript
$(document).ready(function() {
alert('image will change');
$('.closed').css({'background-image' : 'url(https://www.aristo.com.hk/images/Coursebook launch banner.jpg)'});
});