JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container">
  <button>
  Click
  </button>
</div>

CSS

#container {
  width: 100%;
  height: 1000px;
  padding: 20px;
  background-color: orange;
}

button {
  font-size: 24px;
  margin-bottom: 30px;
}

img {
  width: 50px;
  height: 50px;
}

JavaScript

$('button').on('click',function(){
    var img = $('<img class="image" src="http://images.clipartpanda.com/ninja-clip-art-000056m.jpg" />');
    var imgContainer = $('<div></div>');
    imgContainer.append(img);
		$('#container').append(imgContainer);
    
    img.on('load', function(){
        $(this).after("This is a ninja");
    })
});