JSFiddle - React, Tailwind, and code Playground

by Kalu Singh Rao

HTML

<img id="imgr" src="https://www.google.com/images/srpr/logo11w.png" width="100" />
<br/>
<button type="button" id="btnmove">
Move Here !!!
</button>

CSS

img {
    -webkit-transition:1s;
}
.clicked {
    margin-left:50px;
 }

JavaScript

$('#btnmove').on('click', function() {
    $('#imgr').toggleClass('clicked');
});