JSFiddle - React, Tailwind, and code Playground

by Satpal Singh

HTML

<div id="" style="height:100px; width:200px; margin-right:10px; float:left;">
    <img class="remove-img" src="http://www.dlwp.com/Templates/DLWP/Images/popup-close-button.png" style="float:right; vertical-align:top; height:18px; width:18px; z-index:9999;">
    <div style="height:100px; width:200px; border:1px solid #999; float:left; margin: 0 10px 0 0; box-shadow: 0 0 1px 1px #888888;"> <a class="" href="#" title="">
        	<img src="http://www.mytriptokerala.com/images/Attractions/Backwaters-1858256226.jpg" style="height:100px; width:200px; z-index:999;" id="">
        </a>

    </div>
</div>
<div id="" style="height:100px; width:200px; margin-right:10px; float:left;">
    <img class="remove-img" src="http://www.dlwp.com/Templates/DLWP/Images/popup-close-button.png" style="float:right; vertical-align:top; height:18px; width:18px; z-index:9999;">
    <div style="height:100px; width:200px; border:1px solid #999; float:left; margin: 0 10px 0 0; box-shadow: 0 0 1px 1px #888888;"> <a class="" href="#" title="">
        	<img src="http://sympol.cusat.ac.in/img/photo_grid/grid-img-07.jpg" style="height:100px; width:200px; z-index:999;" id="">
        </a>

    </div>
</div>
<div id="" style="height:100px; width:200px; margin-right:10px; float:left;">
    <img class="remove-img" src="http://www.dlwp.com/Templates/DLWP/Images/popup-close-button.png" style="float:right; vertical-align:top; height:18px; width:18px; z-index:9999;">
    <div style="height:100px; width:200px; border:1px solid #999; float:left; margin: 0 10px 0 0; box-shadow: 0 0 1px 1px #888888;"> <a class="" href="#" title="">
        	<img src="http://wikitravel.org/upload/shared//thumb/6/65/Kerala_Backwaters.jpg/350px-Kerala_Backwaters.jpg" style="height:100px; width:200px; z-index:999;" id="">
        </a>

    </div>
</div>

JavaScript

$('.remove-img').click(function (e) {
    $(this).parent().find('img').not(this).remove();
});