JSFiddle - React, Tailwind, and code Playground
HTML
<div id="img-list">
<img src="http://funny-pics-fun.com/wp-content/uploads/Cheerful-And-Playful-Squirrels-7.jpg"/>
<img src="http://freefunnypixs.com/wp-content/uploads/2011/11/Funny-Mill-Funny-Cats-Collection-pic-22.jpg" />
<img src="http://3.bp.blogspot.com/-12lT7xAMupA/TqAk3KYsAaI/AAAAAAAA73M/HpywfVbU1Nc/s640/funny+cat+pictures+with+captions+%252816%2529.jpg" />
</div>
<div id="div1">
</div>
CSS
#div1 {
width: 300px;
height: 300px;
border: 1px solid gray;
position: fixed;
top: 0px;
right: 0px;
}
JavaScript
$('#img-list img').each(function(){
$(this).bind('click', function(){
$('#div1').css('background', 'url('+this.src+')');
}.bind(this)
)});