JSFiddle - React, Tailwind, and code Playground

by victorrseloy

HTML

<input type='button' value='Show Picture' id='add'>
<div class='input'>
    <img src="http://www.placekitten.com/200/200" />
</div>

CSS

.input img:first-child {
    display: none;
}

JavaScript

$("#add").click(function() {
    var container = $(this).next(),
        img = container.find('img').first().clone();
    img.hide().appendTo(container).fadeIn(600);
});