JSFiddle - React, Tailwind, and code Playground

by jowan

HTML

<div id="one">
<img src="http://th07.deviantart.net/fs71/150/f/2011/013/c/a/kushimaru_kuriarare_by_skysharkie-d374376.png" class="img1"/>
</div>

CSS

img {
    border: 2px solid red;
}

JavaScript

var id= 'img1';
    $cloneimg= $('#one img.' + id).clone();
    $cloneimg.appendTo('#one');