JSFiddle - React, Tailwind, and code Playground

HTML

<div id='test'></div>

CSS

#test { height: 200px; background-image: url(https://color.adobe.com/api/v2/themes/2022184.png) }

JavaScript

var test = document.getElementById('test');

$('#test').on("click", function () {
    $(this).css("background-image", "url(http://www.myfreetextures.com/wp-content/uploads/2011/06/old-paper-floral-parchment-background-texture.jpg)");
});