JSFiddle - React, Tailwind, and code Playground

by ianwong

HTML

<img class="image" src="http://upload.wikimedia.org/wikipedia/commons/3/3e/Uluru_Panorama.jpg" />
<p>Above is an image with original size.</p>
<p>After click on the image,it will show an other image with size changing.</p>
<img class="image_change_size" src="" />

JavaScript

$(document).ready(function () {
    $(".image").click(function () {
        $('.image_change_size').attr('src', $(this).attr('src'));
        $('.image_change_size').css('height', '100px');
        $('.image_change_size').css('width', '100px');
    });
});