One of the challenges I'm facing involves a dynamic span element that changes based on color selection:
<span class="color checked" style="background-color: #ff0000">Red</span>
In addition, I have an image element without any specific class attached to it:
<img id="image-png" src="myimage.png">
My current goal is to dynamically append the background-color style and value from the 'checked' span element to the image using JavaScript. Any suggestions on how this can be achieved?